diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-05-11 19:55:14 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-06-13 22:21:41 +0200 |
commit | 5b9199aa7580b5c6ab0b0aa43fb7a650e34ddfc3 (patch) | |
tree | 0d3f7be59be2da62b3004b644dd0001179c97a05 /scripts/lib/ptxd_lib_dgen.awk | |
parent | 781197a5a6cbde678c27bbe055aaa4d89bd3a843 (diff) | |
download | ptxdist-5b9199aa7580b5c6ab0b0aa43fb7a650e34ddfc3.tar.gz ptxdist-5b9199aa7580b5c6ab0b0aa43fb7a650e34ddfc3.tar.xz |
ptxd_lib_dgen: first steps for image packages
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_lib_dgen.awk')
-rw-r--r-- | scripts/lib/ptxd_lib_dgen.awk | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index f478b03fb..8c957e140 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -324,24 +324,46 @@ function write_deps_pkg_active_virtual(this_PKG, this_pkg, prefix) { print "$(STATEDIR)/" this_pkg ".install.unpack: " "$(STATEDIR)/" virtual ".install" > DGEN_DEPS_POST; } +function write_deps_pkg_active_image(this_PKG, this_pkg, prefix) { + print "$(" this_PKG "_IMAGE): " \ + "$(addprefix $(STATEDIR)/,$(addsuffix .targetinstall.post,$(" this_PKG "_PKGS)))" > DGEN_DEPS_POST; + print "$(" this_PKG "_IMAGE): " "$(" this_PKG "_FILES)" > DGEN_DEPS_POST; + print "images: " "$(" this_PKG "_IMAGE)" > DGEN_DEPS_POST; + # + # add dep to pkgs we depend on + # + this_PKG_DEPS = PKG_to_B_DEP[this_PKG]; + n = split(this_PKG_DEPS, this_DEP_array, " "); + for (i = 1; i <= n; i++) { + this_dep = PKG_to_pkg[this_DEP_array[i]] + print "$(" this_PKG "_IMAGE): " "$(STATEDIR)/" this_dep ".targetinstall.post" > DGEN_DEPS_POST; + } +} + END { # for all pkgs for (this_PKG in PKG_to_pkg) { this_pkg = PKG_to_pkg[this_PKG]; - this_pkg_prefix = gensub(/^(host-|cross-|).*/, "\\1", "", this_pkg) + this_pkg_prefix = gensub(/^(host-|cross-|image-|).*/, "\\1", "", this_pkg) write_include(this_PKG) - write_deps_pkg_all(this_PKG, this_pkg) - write_vars_pkg_all(this_PKG, this_pkg, this_pkg_prefix) + if (this_pkg_prefix != "image-") { + write_deps_pkg_all(this_PKG, this_pkg) + write_vars_pkg_all(this_PKG, this_pkg, this_pkg_prefix) + } } # for active pkgs for (this_PKG in active_PKG_to_pkg) { this_pkg = PKG_to_pkg[this_PKG]; - this_pkg_prefix = gensub(/^(host-|cross-|).*/, "\\1", "", this_pkg) + this_pkg_prefix = gensub(/^(host-|cross-|image-|).*/, "\\1", "", this_pkg) - write_deps_pkg_active(this_PKG, this_pkg, this_pkg_prefix) - write_deps_pkg_active_virtual(this_PKG, this_pkg, this_pkg_prefix) + 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) + } + else + write_deps_pkg_active_image(this_PKG, this_pkg, this_pkg_prefix) } close(PKG_HASHFILE); |