diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-10-06 22:02:27 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-10-07 18:28:40 +0200 |
commit | b30e52390ff63e2352757cd805cabbfcd65aacec (patch) | |
tree | 222459b839be5a8a9603dccc23112615045c9eb3 | |
parent | 2043f3df5461ee66788893aa2425b2b7cc112a1b (diff) | |
download | ptxdist-b30e52390ff63e2352757cd805cabbfcd65aacec.tar.gz ptxdist-b30e52390ff63e2352757cd805cabbfcd65aacec.tar.xz |
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 <PKG>_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 <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_lib_dgen.awk | 7 |
1 files changed, 7 insertions, 0 deletions
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) |