From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Singer Date: Thu, 7 Aug 2003 10:54:34 -0700 Subject: [U-Boot-Users] Preparing a KEV7a400 patch In-Reply-To: <20030807125147.DF2A9C59E4@atlas.denx.de> References: <20030807004716.GA20846@buici.com> <20030807125147.DF2A9C59E4@atlas.denx.de> Message-ID: <20030807175434.GA4881@buici.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Aug 07, 2003 at 02:51:42PM +0200, Wolfgang Denk wrote: > I don't see what good it does. For all boards I tried it just > generates an empty "configx.mk" file (well,tnot exactly empty, but > two blank lines and a comment). The ppc preprocessor behaves a bit differently from the other's I've used. Change the line grep -E 'define[ \t]+CONFIG_[^ \t]*[ \t]+1$' | to grep -E 'define[ \t]+CONFIG_[^ \t]*[ \t]+1[ \t]*$' | I wrote a Perl script to test this. It configures every target and then builds the configx.mk file. I'm attaching the script in case you want to use it. I noticed that a couple of targets fail because of missing headers in the board specific directories. > I remember you wanted to avoid using $(CC) -E ? I found no other reliable way to access the target-specific preprocessor. You made it clear that you want to use the cross-compiler's preprocessor, so this a method to do that. As for submitting patches against more recent source, I'd be happy to do so. The sourceforge CVS server doesn't want to let me login as anonymous. I'll use a more recent snapshot if you have one. Cheers. -------------- next part -------------- #!/usr/bin/perl $dir_uboot = "u-boot"; $dir_out = "configxs"; open (MAKEFILE, "<$dir_uboot/Makefile") || die "$dir_uboot/Makefile must be the top level Makefile"; -d $dir_out || qx(mkdir -p $dir_out); qx(rm $dir_out/* 2>&1); my %configs = (); while () { next if ! m/^(.*_config):/; $configs{$1} = 1; } for $c (sort (keys (%configs))) { print "$c \n"; -f "$dir_uboot/configx.mk" && unlink ("$dir_uboot/configx.mk"); print qx(cd $dir_uboot; make $c; make configx.mk); # print qq(mv "$dir_uboot/configx.mk" "$dir_out/${c}_configx.mk"); qx!mv "$dir_uboot/configx.mk" "$dir_out/${c}_configx.mk"!; last; } 0;