summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-05-17 11:02:39 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-05-19 08:36:19 +0200
commitdd4aa1eaac036c8dfbe7c43239466c2f43a17d1a (patch)
tree652628fa0f2e92ace2a3bbdef2e24178dba92c8a
parent19d8d0e877fe864920e60a9964304f9e87338ede (diff)
downloadptxdist-dd4aa1eaac036c8dfbe7c43239466c2f43a17d1a.tar.gz
ptxdist-dd4aa1eaac036c8dfbe7c43239466c2f43a17d1a.tar.xz
ptxd_lib_dgen: merge dependencies of virtual packages
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/ptxdist-dgen.in3
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk22
2 files changed, 25 insertions, 0 deletions
diff --git a/rules/ptxdist-dgen.in b/rules/ptxdist-dgen.in
index a32fe3008..e40513dc6 100644
--- a/rules/ptxdist-dgen.in
+++ b/rules/ptxdist-dgen.in
@@ -13,3 +13,6 @@ config RUNTIME
config BUILDTIME
bool
default y if PTXDIST_DEP_TARGET != "run"
+
+config VIRTUAL
+ bool
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index f0af04278..f71a12bc4 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -135,6 +135,11 @@ $1 ~ /^PTX_MAP_._DEP/ {
for (i = 1; i <= n; i++) {
this_DEP = this_DEP_array[i];
+ if (this_DEP ~ /^VIRTUAL$/) {
+ virtual_pkg[this_PKG] = 1
+ continue;
+ }
+
if (!(this_DEP in PKG_to_pkg))
continue
@@ -209,6 +214,16 @@ function write_maps(this_PKG, dep_type) {
return;
n = split(this_PKG_DEP, this_DEP_array, " ");
+ for (i = 1; i <= n; i++) {
+ if (this_DEP_array[i] in virtual_pkg) {
+ if (dep_type == "R")
+ virtual_PKG_DEP = PKG_to_R_DEP[this_DEP_array[i]];
+ else
+ virtual_PKG_DEP = PKG_to_B_DEP[this_DEP_array[i]];
+ this_PKG_DEP = this_PKG_DEP " " virtual_PKG_DEP
+ }
+ }
+ n = split(this_PKG_DEP, this_DEP_array, " ");
asort(this_DEP_array, this_DEP_array);
this_PKG_dep = ""
this_PKG_DEP = ""
@@ -216,11 +231,18 @@ function write_maps(this_PKG, dep_type) {
for (i = 1; i <= n; i++) {
if (last == this_DEP_array[i])
continue
+ if (this_DEP_array[i] in virtual_pkg)
+ continue
this_PKG_DEP = this_PKG_DEP " " this_DEP_array[i];
this_PKG_dep = this_PKG_dep " " PKG_to_pkg[this_DEP_array[i]];
last = this_DEP_array[i]
}
+ if (dep_type == "R")
+ PKG_to_R_DEP[this_PKG]= this_PKG_DEP;
+ else
+ PKG_to_B_DEP[this_PKG]= this_PKG_DEP;
+
print "PTX_MAP_" dep_type "_DEP_" this_PKG "=" this_PKG_DEP > MAP_DEPS;
print "PTX_MAP_" dep_type "_dep_" this_PKG "=" this_PKG_dep > MAP_DEPS;
print "PTX_MAP_" dep_type "_dep_" this_PKG "=" this_PKG_dep > MAP_ALL_MAKE;