summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-10-12 07:38:35 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-10-12 07:52:29 +0200
commit477cdd08aeeeb965ce6b2a001b2c2cdfa9e63daa (patch)
treee78c497c8c734f09ba0a89efc35ff2011ebf5d3a /scripts
parent69af5171e05ff4dabcbf8768e5b98772c9b874f8 (diff)
downloadptxdist-477cdd08aeeeb965ce6b2a001b2c2cdfa9e63daa.tar.gz
ptxdist-477cdd08aeeeb965ce6b2a001b2c2cdfa9e63daa.tar.xz
ptxd_lib_dgen: make sure the source -> package mapping is defined
For all active packages "$(<PKG>_SOURCE): <PKG>" is defined. Host and cross packages are skipped if the target package has the same source. As a result, the mapping is missing if the host package is enabled but not the target package. Fix this by defining the mapping for host and cross packages if the target package is disabled. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index dd40660bd..42600f924 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -344,12 +344,11 @@ function write_deps_pkg_active(this_PKG, this_pkg, prefix) {
#
# default deps
#
- if (prefix != "") {
- target_PKG = gensub(/^HOST_|^CROSS_/, "", 1, this_PKG);
+ target_PKG = gensub(/^HOST_|^CROSS_/, "", 1, this_PKG);
+ if (prefix != "" && target_PKG in active_PKG_to_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 != "")
+ if (prefix != "" && target_PKG in active_PKG_to_pkg)
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;