0010-rules.mk-make-PKG_CONFIG_DEPENDS-properly-track-string-values.patch 972 B

123456789101112131415161718192021222324
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Fri, 24 Feb 2017 12:16:33 +0100
  3. Subject: rules.mk: make PKG_CONFIG_DEPENDS properly track string values
  4. The confvar macro is adjusted to not only consider if a variable has a
  5. value or not, but also the value itself. Instead of creating a string of
  6. 'y' and 'n' characters, all variable names and values are concatenated
  7. and hashed.
  8. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  9. diff --git a/rules.mk b/rules.mk
  10. index 1b9de5f35e3890c2759ab2cdbd98ac80df942124..626bfca1ba73b96ee0f86a2de4afe643d83b360c 100644
  11. --- a/rules.mk
  12. +++ b/rules.mk
  13. @@ -29,7 +29,7 @@ empty:=
  14. space:= $(empty) $(empty)
  15. comma:=,
  16. merge=$(subst $(space),,$(1))
  17. -confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
  18. +confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(STAGING_DIR_HOST)/bin/mkhash md5)
  19. strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
  20. paren_left = (