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

Mike Frysinger vapier at gentoo.org
Mon May 9 17:29:15 CEST 2011


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 


More information about the U-Boot mailing list