From 400bee10bdb3f6ab29304365a19ce05929f09436 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 28 Sep 2018 19:02:50 +0200 Subject: ptxd_lib_dgen: make sure $(_SOURCE) refers to the primary package To get the package for a source archive we define for each package: $(_SOURCE) := With host and cross packages that share the source with the target package, the same variable may be defined multiple times. Which one 'wins' is undefined. Avoid this by only defining the variable for the target package. Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_lib_dgen.awk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index 888d989ee..5437d497c 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -338,7 +338,13 @@ function write_deps_pkg_active(this_PKG, this_pkg, prefix) { # # default deps # + if (prefix != "") { + target_PKG = gensub(/^HOST_|^CROSS_/, "", 1, this_PKG); + print "ifneq ($(" this_PKG "_SOURCE),$(" target_PKG "_SOURCE))" > DGEN_DEPS_POST; + } print "$(if $(" this_PKG "_SOURCE),$(eval $(" this_PKG "_SOURCE) := " this_PKG "))" > DGEN_DEPS_POST; + if (prefix != "") + print "endif" > DGEN_DEPS_POST; print "$(foreach src,$(" this_PKG "_SOURCES)," \ "$(eval $(STATEDIR)/" this_pkg ".get:" "$(STATEDIR)/" this_pkg ".$(notdir $(src)).stamp))" > DGEN_DEPS_POST; print "$(STATEDIR)/" this_pkg ".extract: " "$(STATEDIR)/" this_pkg ".get" > DGEN_DEPS_POST; -- cgit v1.2.3