summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-11-08 18:04:07 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-11-26 07:59:56 +0100
commit501b1fcb20a4ced6478a155fa9e5c5d9aaf018ae (patch)
tree087e306d92aaf3a9066a14a47927122e2b980b8d
parentc5b07b5fb1bac94f8db0b13bae4f33fdf6aa54b1 (diff)
downloadptxdist-501b1fcb20a4ced6478a155fa9e5c5d9aaf018ae.tar.gz
ptxdist-501b1fcb20a4ced6478a155fa9e5c5d9aaf018ae.tar.xz
ptxd_lib_dgen: handle missing config files better
The prepare or image stages used to have a dependency on the config files in the past. Changes in the config file are now handled by the pkghash so the dependency was removed. Howerver, the dependency was often used to provide an extra features: Packages provide a target for the config to print a custom error message if the config file was missing. Reintroduce the dependency again but only if the the file is missing to restore this feature. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index f07aae97a..dc2f13bc0 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -381,6 +381,11 @@ function write_deps_pkg_active_cfghash(this_PKG, this_pkg) {
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 "else" > DGEN_DEPS_POST;
+ if (this_pkg_prefix != "image-")
+ print "$(STATEDIR)/" this_pkg ".prepare: " "$(" this_PKG "_CONFIG)" > DGEN_DEPS_POST;
+ else
+ print "$(" this_PKG "_IMAGE): " "$(" this_PKG "_CONFIG)" > DGEN_DEPS_POST;
print "endif" > DGEN_DEPS_POST;
print "endif" > DGEN_DEPS_POST;
print "endif" > DGEN_DEPS_POST;