diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-09-28 19:02:50 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-09-30 18:32:46 +0200 |
commit | 400bee10bdb3f6ab29304365a19ce05929f09436 (patch) | |
tree | ecf1fc5005ff72bf7e4f9b8234a11963c57d5560 | |
parent | 726f53a5e490e6ffebbc38bf4e1333413aa3baa0 (diff) | |
download | ptxdist-400bee10bdb3f6ab29304365a19ce05929f09436.tar.gz ptxdist-400bee10bdb3f6ab29304365a19ce05929f09436.tar.xz |
ptxd_lib_dgen: make sure $(<PKG>_SOURCE) refers to the primary package
To get the package for a source archive we define for each package:
$(<PKG>_SOURCE) := <PKG>
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 <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_lib_dgen.awk | 6 |
1 files changed, 6 insertions, 0 deletions
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; |