summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-05-20 11:36:26 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-05-20 11:36:31 +0200
commitda51ebe8033f94a9c7bb49945ebc31931268b72b (patch)
treebc0b6b7f538e0f1da20ef7603c24f22a6e634aed /scripts
parent5633496754902a804ace86f1cc918226af4179bb (diff)
downloadptxdist-da51ebe8033f94a9c7bb49945ebc31931268b72b.tar.gz
ptxdist-da51ebe8033f94a9c7bb49945ebc31931268b72b.tar.xz
ptxd_lib_dgen: fix order of generated output
Without this <PKG>_CFGHASH is used in dependencies before it is set. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk20
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index 14171c2ca..4688461a6 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -341,11 +341,17 @@ function write_deps_pkg_all(this_PKG, this_pkg) {
print "endif" > DGEN_DEPS_POST;
}
-function write_deps_pkg_active_all(this_PKG, this_pkg) {
+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 "$(call ptx/force-sh, cat '$(" this_PKG "_CONFIG)' >> " PTXDIST_TEMPDIR "/pkghash-" this_PKG ")" > DGEN_DEPS_POST;
- print "else" > DGEN_DEPS_POST;
+ print "endif" > DGEN_DEPS_POST;
+ 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 "ifeq ($(wildcard $(" 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;
print "endif" > DGEN_DEPS_POST;
@@ -500,6 +506,13 @@ function write_deps_pkg_active_image(this_PKG, this_pkg, prefix) {
}
END {
+ # extend pkghash files fist
+ for (this_PKG in active_PKG_to_pkg)
+ write_deps_pkg_active_cfghash(this_PKG, this_pkg)
+
+ 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;
+
# for all pkgs
for (this_PKG in PKG_to_pkg) {
this_pkg = PKG_to_pkg[this_PKG];
@@ -533,9 +546,6 @@ END {
dump_file(PKG_to_makefile[this_PKG], PTXDIST_TEMPDIR "/pkghash-" this_PKG);
}
- 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(PKG_HASHFILE);
close(MAP_ALL);
close(MAP_ALL_MAKE);