From 501b1fcb20a4ced6478a155fa9e5c5d9aaf018ae Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 8 Nov 2019 18:04:07 +0100 Subject: 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 --- scripts/lib/ptxd_lib_dgen.awk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') 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; -- cgit v1.2.3