Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Including target makefiles before package makefiles
@ 2008-11-26 23:41 Philip Prindeville
  0 siblings, 0 replies; only message in thread
From: Philip Prindeville @ 2008-11-26 23:41 UTC (permalink / raw)
  To: buildroot

Sorry if this is obvious or has been discussed much at length...  I'm 
relatively new to the development discussion.

I've recently become one of the defacto maintainers of the AstLinux 
distro on sourceforge, and was trying to make version bumps of various 
packages a little simpler.  A lot of the makefiles being used were 
inherited from a fairly old version of buildroot, but I couldn't say 
which or what its direct provenance was (it might have been borrowed 
from openwrt, I'm not sure).

In any case, I noticed that there was:

include toolchain/*/*.mk
include package/*/*.mk
include target/*/*.mk

which stopped me from doing something like:

linux.mk:

LINUX_VERSION:=2.6.25.19
...
target/Makefile.in:

LINUX_VERSION_MAJOR:=$(word 1,$(subst .,$(space),$(LINUX_VERSION)))
LINUX_VERSION_MINOR:=$(word 2,$(subst .,$(space),$(LINUX_VERSION)))
LINUX_VERSION_TRIPLE:=$(subst, $(space),.,$(wordlist 1,3,$(subst 
.,$(space),$(LINUX_VERSION))))

package/iproute2/iproute2.mk:

IPROUTE2_VER:=$(LINUX_VERSION_TRIPLE)

because IPROUTE2_VER would get parsed before LINUX_VERSION_TRIPLE.

Which got me thinking:  the tools don't care about anything else.  
Therefore toolchain should always come first.  The package shouldn't 
influence the OS version, but the OS version often influences the 
package version (for compatibility reasons).  Therefore, the packages 
should be read after the target info.  So, the proper version of 
includes should be:

include toolchain/*/*.mk
include target/*/*.mk
include target/Makefile.in
include package/*/*.mk

Have I misunderstood anything?  Someone want to set me straight?

Thanks,

-Philip

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-26 23:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 23:41 [Buildroot] Including target makefiles before package makefiles Philip Prindeville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox