rules.mk: make PKG_CONFIG_DEPENDS properly track string values
[openwrt/openwrt.git] / rules.mk
index b1d9926270eb5d74f0e1e90fff2eb16163778d73..d58f8d92d3edcb2db72f0440ff1c1619219f7abe 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -29,7 +29,7 @@ empty:=
 space:= $(empty) $(empty)
 comma:=,
 merge=$(subst $(space),,$(1))
-confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
+confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(STAGING_DIR_HOST)/bin/mkhash md5)
 strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
 
 paren_left = (
@@ -383,7 +383,7 @@ endef
 # $(1) => Input directory
 define sha256sums
        (cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
-               xargs openssl dgst -sha256 | sed -ne 's!^SHA256(\(.*\))= \(.*\)$$!\2 *\1!p' > sha256sums)
+               xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
 endef
 
 # file extension