[Buildroot] [PATCH 1/1] package/pkg-autotools.mk: add host-m4 dependency
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sat Oct 18 13:24:43 UTC 2014
Dear Karoly Kasza,
On Fri, 17 Oct 2014 20:25:19 +0200, Karoly Kasza wrote:
> host-autoconf depends on host-m4, which is not reflected in
> package/pkg-autotools.mk. This obstructs "make source" from running
> host-m4-source, making offline builds fail while trying to download
> it before building host-autoconf.
>
> Signed-off-by: Karoly Kasza <kaszak at gmail.com>
> ---
> package/pkg-autotools.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
The host-autoconf package already has a dependency on host-m4. See
package/autoconf/autoconf.mk:
HOST_AUTOCONF_DEPENDENCIES = host-m4 host-libtool
Maybe the problem you're seeing is that we're not expanding completely
the host dependencies:
# host-* dependencies have to be handled specially, as those aren't
# visible in Kconfig and hence not added to a variable like TARGETS.
# instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
# variable for each enabled target.
# Notice: this only works for newstyle gentargets/autotargets packages
TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
$(addsuffix _DEPENDENCIES,\
$(call UPPERCASE,$(TARGETS) $(TARGETS_ROOTFS))),\
$($(dep)))))
# Host packages can in turn have their own dependencies. Likewise find
# all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
# host package found above. Ideally this should be done recursively until
# no more packages are found, but that's hard to do in make, so limit to
# 1 level for now.
HOST_DEPS = $(sort $(foreach dep,\
$(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\
$($(dep))))
HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
I once drafted a solution for this, but never gotten around to
finishing it and submitting the patch. Something I (or someone) need to
work on at some point.
But in the mean time, the patch you're proposing is not correct, as
it's only work-arounding the problem, and fixes it only for on specific
use case.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list