From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Schwingen Date: Mon, 09 May 2011 17:54:15 +0200 Subject: [U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database In-Reply-To: <201105091129.16517.vapier@gentoo.org> References: <20110505214836.GA5313@discworld.dascon.de> <4DC5259C.7040208@discworld.dascon.de> <201105091129.16517.vapier@gentoo.org> Message-ID: <4DC80E27.1050808@discworld.dascon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Mike Frysinger wrote: > 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. > Then we are back at basically the current state. If I do this, we need no Makefile support at all - we just need a script that is run by the maintainer that downloads the current mach-types from the web, and generates mach-types.h, which is then checked in. cu Michael