From b30e52390ff63e2352757cd805cabbfcd65aacec Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sat, 6 Oct 2018 22:02:27 +0200 Subject: ptxd_lib_dgen: let packages depend on config files For kconfig based packages, the prepare stage should depend on the config file to ensure that the package is rebuilt when the config changes. Just do it for all packages. It's a noop if no config is defined. Also add the equivalent dependency for image packages. Only add dependencies if _CONFIG seems to be an absolute path. This is necessary to avoid problems with genimage packages: The config file is a relative path to config/images/ and a dependency is generated at built-time. Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_lib_dgen.awk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index 5437d497c..dd40660bd 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -334,6 +334,12 @@ function write_deps_pkg_all(this_PKG, this_pkg) { print "endif" > DGEN_DEPS_POST; } +function write_deps_pkg_active_all(this_PKG, this_pkg) { + print "ifneq ($(filter /%,$(" this_PKG "_CONFIG)),)" > DGEN_DEPS_POST; + print "$(STATEDIR)/" this_pkg ".$(" this_PKG "_CFGHASH).cfghash: $(" this_PKG "_CONFIG)" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; +} + function write_deps_pkg_active(this_PKG, this_pkg, prefix) { # # default deps @@ -501,6 +507,7 @@ END { this_pkg = PKG_to_pkg[this_PKG]; this_pkg_prefix = gensub(/^(host-|cross-|image-|).*/, "\\1", 1, this_pkg) + write_deps_pkg_active_all(this_PKG, this_pkg) if (this_pkg_prefix != "image-") { write_deps_pkg_active(this_PKG, this_pkg, this_pkg_prefix) write_deps_pkg_active_virtual(this_PKG, this_pkg, this_pkg_prefix) -- cgit v1.2.3