package: derive HOST_FOO_DEPENDENCIES from FOO_DEPENDENCIES
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Mon, 16 Jan 2012 13:58:35 +0000 (14:58 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 17 Jan 2012 22:28:47 +0000 (23:28 +0100)
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Makefile.autotools.in
package/Makefile.package.in

index c84afa0b19db29e3adbac7e6b53213451cdec6c1..495a075809dae6a11c2db82022842c5c9d39c2fc 100644 (file)
@@ -200,6 +200,16 @@ define AUTORECONF_HOOK
        fi
 endef
 
+# This must be repeated from GENTARGETS_INNER, otherwise we get an empty
+# _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
+# away from the non-host rule
+ifndef $(2)_DEPENDENCIES
+ ifdef $(3)_DEPENDENCIES
+  $(2)_DEPENDENCIES = $(filter-out host-automake host-autoconf host-libtool,\
+    $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+ endif
+endif
+
 ifeq ($$($(2)_AUTORECONF),YES)
 $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
 $(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
index e85eb15490bd70e53c6fa4eedfa961a980b5ee98..a27804b8111ebabffab5d8e658f5f43ae852d041 100644 (file)
@@ -542,7 +542,12 @@ $(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
 endif
 endif
 
-$(2)_DEPENDENCIES              ?=
+ifndef $(2)_DEPENDENCIES
+ ifdef $(3)_DEPENDENCIES
+  $(2)_DEPENDENCIES = $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
+ endif
+endif
+
 $(2)_INSTALL_STAGING           ?= NO
 $(2)_INSTALL_IMAGES            ?= NO
 $(2)_INSTALL_TARGET            ?= YES