[Buildroot] RFC: option to Makefile.autotools.in to build in $(PROJECT_BUILD_DIR)

Hamish Moffatt hamish at cloud.net.au
Thu Feb 19 23:39:52 UTC 2009


On Thu, Feb 19, 2009 at 01:43:06PM +0100, Peter Korsgaard wrote:
> >>>>> "Bernhard" == Bernhard Reutner-Fischer <rep.dot.nop at gmail.com> writes:
> 
> Hi,
> 
>  >> The target-specific-variable make feature is indeed usefull, but I
>  >> don't quite see how to apply it in this case.
> 
>  Bernhard> in this case just pickup an eventually given per-package
>  Bernhard> objdir instead of always using BUILD_DIR, perhaps something
>  Bernhard> like OBJDIR=$(if
>  Bernhard> $$($(2)_BUILDDIR),$$($(2)_BUILDDIR),$(BUILD_DIR))
> 
>  Bernhard> so you can just
>  Bernhard> package/foo/foo.mk:FOO_BUILDDIR=$(PROJECT_BUILDDIR)
>  Bernhard> (modulo typos)
> 
> That's pretty much what I suggested, but it doesn't remove the etra
> complexity to the Makefile.autotools.in rules (there's a generic set
> of rules going $(BUILD_DIR)/%/.stamp_<something>:). The package
> settings for the other things are done with ?= <default>, so adding a
> $(2)_BUILDDIR ?= $(BUILD_DIR) would be enough.

An alternative would be to move the rules within the macro expansion,
specifying exact filenames (via variable expansion) rather than using 
$(BUILD_DIR)/%/... That would be neater but would add a significant 
number of new rules (after expansion).


Hamish
-- 
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>



More information about the buildroot mailing list