Skip to contentSkip to conversation

package/pkg-autotools.mk: add host-m4 dependency

PATCH New Karoly Kasza 2 participants 2 messages Oct 17, 2014 – Oct 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-autotools.mk: add host-m4 dependency

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.

---
 package/pkg-autotools.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-autotools.mk +2 -2
index 2c93dd9..77bf696 100644
@@ -248,7 +248,7 @@ endef
 # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
 # and _GETTEXTIZE away from the non-host rule
 ifeq ($(4),host)
-$(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool \
+$(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool host-m4 \
 				host-gettext host-toolchain $(1),\
     $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
 endif
@@ -260,7 +260,7 @@ $(2)_PRE_CONFIGURE_HOOKS += GETTEXTIZE_HOOK
 $(2)_DEPENDENCIES += host-gettext
 endif
 $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
-$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
+$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool host-m4
 endif
 
 #
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 package/pkg-autotools.mk: add host-m4 dependency

Dear Karoly Kasza,

Quoted 9 lines · Karoly Kasza

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.

---
 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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com