summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-05-17 12:33:49 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-05-17 14:17:08 +0200
commitec5dc67c98633db0e4ee11146f4b785b42af83e3 (patch)
tree00124e796dfef31ef505b68b58c815de37322416 /scripts
parentf0473a283f689b1ebeb535e90f6822ce6ba375b6 (diff)
downloadptxdist-ec5dc67c98633db0e4ee11146f4b785b42af83e3.tar.gz
ptxdist-ec5dc67c98633db0e4ee11146f4b785b42af83e3.tar.xz
ptxd_lib_dgen: include content of <PKG>_CONFIG in <PKG>_CFGHASH
To do this, append the <PKG>_CONFIG files to the pkghash-<PKG> files in ptx_dgen_deps.post and delay the md5 generation until that is done. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index f18648feb..14171c2ca 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -343,8 +343,12 @@ function write_deps_pkg_all(this_PKG, this_pkg) {
function write_deps_pkg_active_all(this_PKG, this_pkg) {
print "ifneq ($(filter /%,$(" this_PKG "_CONFIG)),)" > DGEN_DEPS_POST;
+ print "ifneq ($(wildcard $(" this_PKG "_CONFIG)),)" > DGEN_DEPS_POST;
+ print "$(call ptx/force-sh, cat '$(" this_PKG "_CONFIG)' >> " PTXDIST_TEMPDIR "/pkghash-" this_PKG ")" > DGEN_DEPS_POST;
+ print "else" > DGEN_DEPS_POST;
print "$(STATEDIR)/" this_pkg ".$(" this_PKG "_CFGHASH).cfghash: $(" this_PKG "_CONFIG)" > DGEN_DEPS_POST;
print "endif" > DGEN_DEPS_POST;
+ print "endif" > DGEN_DEPS_POST;
}
function write_deps_pkg_active(this_PKG, this_pkg, prefix) {
@@ -529,14 +533,10 @@ END {
dump_file(PKG_to_makefile[this_PKG], PTXDIST_TEMPDIR "/pkghash-" this_PKG);
}
- close(PKG_HASHFILE);
- MD5SUM_CMD = "md5sum " PTXDIST_TEMPDIR "/pkghash-*";
- while (MD5SUM_CMD | getline) {
- split($0, line, "[ -]")
- print line[length(line)] "_CFGHASH = " line[1] > DGEN_DEPS_PRE;
- }
+ print "$(call ptx/force-sh, md5sum " PTXDIST_TEMPDIR "/pkghash-* | sed 's;^\\([a-z0-9]*\\).*pkghash-\\(.*\\)$$;\\2_CFGHASH := \\1;' > " PTXDIST_TEMPDIR "/pkghash.make)" > DGEN_DEPS_POST;
+ print "include " PTXDIST_TEMPDIR "/pkghash.make" > DGEN_DEPS_POST;
- close(MD5SUM_CMD)
+ close(PKG_HASHFILE);
close(MAP_ALL);
close(MAP_ALL_MAKE);
close(MAP_DEPS);