summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2020-01-20 13:56:50 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-01-23 17:08:35 +0100
commitc94c7174673bb84ec85a480f67ff6b722c932467 (patch)
treed0c7f7e80aebf36982418d5a58dea29a8521c4f4 /scripts
parent7494d2baf7e3cf23ed3eb5c9ccc9132fd81a4cee (diff)
downloadptxdist-c94c7174673bb84ec85a480f67ff6b722c932467.tar.gz
ptxdist-c94c7174673bb84ec85a480f67ff6b722c932467.tar.xz
ptxd_lib_dgen: add helper to get deps
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 dc2f13bc0..483282509 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -255,22 +255,22 @@ function write_vars_all(this_PKG) {
}
}
-function write_maps(this_PKG, dep_type) {
+function pkg_dep(this_PKG, dep_type) {
if (dep_type == "R")
- this_PKG_DEP = PKG_to_R_DEP[this_PKG];
+ return PKG_to_R_DEP[this_PKG];
else
- this_PKG_DEP = PKG_to_B_DEP[this_PKG];
+ return PKG_to_B_DEP[this_PKG];
+}
+function write_maps(this_PKG, dep_type) {
+ this_PKG_DEP = pkg_dep(this_PKG, dep_type);
if (this_PKG_DEP == "")
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]];
+ virtual_PKG_DEP = pkg_dep(this_DEP_array[i], dep_type);
this_PKG_DEP = this_PKG_DEP " " virtual_PKG_DEP
}
}