Only derrive HOST_FOO_DEPENDENCIES from FOO_DEPENDENCIES if not set, not nonempty
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 18 Jan 2012 14:54:55 +0000 (15:54 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 18 Jan 2012 15:02:51 +0000 (16:02 +0100)
In make, ifndef VAR means if 'VAR is not set to the empty string', and
NOT 'VAR is not defined', which meant that you couldn't specify empty
FOO_HOST_DEPENDENCIES.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Makefile.autotools.in
package/Makefile.package.in

index 495a075809dae6a11c2db82022842c5c9d39c2fc..0f9b2c60f4c46059c600d87a371f802939cae84e 100644 (file)
@@ -203,12 +203,9 @@ 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,\
+$(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
index a27804b8111ebabffab5d8e658f5f43ae852d041..e57bfed1b61522ccd7abd6ccf9e7d055d0094ed5 100644 (file)
@@ -542,11 +542,7 @@ $(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
 endif
 endif
 
-ifndef $(2)_DEPENDENCIES
- ifdef $(3)_DEPENDENCIES
-  $(2)_DEPENDENCIES = $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
- endif
-endif
+$(2)_DEPENDENCIES ?= $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
 
 $(2)_INSTALL_STAGING           ?= NO
 $(2)_INSTALL_IMAGES            ?= NO