From 7f33def3b9def03dba293ba9108830459a9383c5 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sun, 6 Oct 2019 19:48:13 +0200 Subject: ptxd_lib_dgen: make sure _CONFIG is only evaluated once Packages may define _CONFIG with '=' to avoid evaluating a complex shell call if the package is not selected. However, this means the variable is evaluated multiple time if the package _is_ selected. Avoid this by overwriting the variable with itself using ':='. Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_lib_dgen.awk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index f04f16b5d..de5a26b02 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -371,11 +371,14 @@ function write_deps_pkg_active_cfghash(this_PKG, this_pkg) { print "endif" > DGEN_DEPS_POST; print "endif" > DGEN_DEPS_POST; print "endif" > DGEN_DEPS_POST; + print this_PKG "_CONFIG := $(" this_PKG "_CONFIG)" > DGEN_DEPS_POST; print "ifeq ($(PTXDIST_PKGHASH_MAKE),)" > DGEN_DEPS_POST; print "ifneq ($(filter /%,$(" this_PKG "_CONFIG)),)" > DGEN_DEPS_POST; print "ifneq ($(wildcard $(" this_PKG "_CONFIG)),)" > DGEN_DEPS_POST; print "$(file >>" PTXDIST_TEMPDIR "/pkghash.list,CONFIG: " this_PKG " $(" this_PKG "_CONFIG))" > DGEN_DEPS_POST; print "endif" > DGEN_DEPS_POST; + print "else" > DGEN_DEPS_POST; + print "undefine " this_PKG "_CONFIG" > DGEN_DEPS_POST; print "endif" > DGEN_DEPS_POST; print "endif" > DGEN_DEPS_POST; } -- cgit v1.2.3