From: Mike Frysinger Date: Mon, 9 May 2011 11:29:15 -0400 Subject: [U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database In-Reply-To: <4DC5259C.7040208@discworld.dascon.de> References: <20110505214836.GA5313@discworld.dascon.de> <4DC5259C.7040208@discworld.dascon.de> Message-ID: <201105091129.16517.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, May 07, 2011 06:57:32 Michael Schwingen wrote: > mach-types.h needs to be built before autoconf.mk can be generated, and > the rules for autoconf.mk are in the top-level Makefile. > > If I put rules in arch/arm/config.mk, then the first of these rules > becomes the default rule which is executed in subdir makes (like "make > -C arch"), which breaks compilation completely, since config.mk is > included before the rules are defined in the subdir Makefiles. > > It seems the current scheme allows only variable definitions in > config.mk files, which is not sufficient here. > > rules.mk would be fine, however, there is no provision to include rules > from lower directories, since all the building in subdirectories is > handled by recursively calling make (this is one of the problems that > arise by recursively calling make for each directory, but that is a > different topic). > > Any ideas? Using the current Makefile structure, I see no other solution > than defining the mach-types.h generation rules in the toplevel Makefile. do you need the mach-types file for anything else ? if not, dont keep that in git, keep the generated header. > > also, dont hardcode full paths to things. there's no reason for it. > > Which of these can be omitted? look for "/bin/" or "/sbin/". if your patch contains those, it is wrong. > > might want to add an "update-mach-types" target so people can type > > `make update-mach-types` and it'll automatically wget the right file > > to the right place ... > > Good idea. > I agree with Wolfgang that this is intended to be used by the maintainer > mainly, so the mach-types file should be included in the source so that > a normal user does not need to download the file. i didnt suggest this in the first place -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110509/22259402/attachment.pgp