Browse Source

Only derrive HOST_FOO_DEPENDENCIES from FOO_DEPENDENCIES if not set, not nonempty

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>
Peter Korsgaard 13 năm trước cách đây
mục cha
commit
1b07928aa6

+ 2 - 5
package/Makefile.autotools.in

@@ -203,12 +203,9 @@ endef
 # This must be repeated from GENTARGETS_INNER, otherwise we get an empty
 # This must be repeated from GENTARGETS_INNER, otherwise we get an empty
 # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
 # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
 # away from the non-host rule
 # 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))))
     $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
- endif
-endif
+
 
 
 ifeq ($$($(2)_AUTORECONF),YES)
 ifeq ($$($(2)_AUTORECONF),YES)
 $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
 $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK

+ 1 - 5
package/Makefile.package.in

@@ -542,11 +542,7 @@ $(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
 endif
 endif
 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_STAGING		?= NO
 $(2)_INSTALL_IMAGES		?= NO
 $(2)_INSTALL_IMAGES		?= NO