From ec5dc67c98633db0e4ee11146f4b785b42af83e3 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 17 May 2019 12:33:49 +0200 Subject: ptxd_lib_dgen: include content of _CONFIG in _CFGHASH To do this, append the _CONFIG files to the pkghash- files in ptx_dgen_deps.post and delay the md5 generation until that is done. Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_lib_dgen.awk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') 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); -- cgit v1.2.3