[U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database

Michael Schwingen rincewind at discworld.dascon.de
Mon May 9 17:54:15 CEST 2011


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



More information about the U-Boot mailing list