summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-04-29 16:41:50 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-05-01 09:12:26 +0200
commit4585d41f5ec80ee704ec474d824ee196af423df2 (patch)
treef66e63ddd04b454e5520e16af58b7be46f18aab5 /scripts
parent2a46d0ad97d3ca310325c31ba9aef633c25eb3cb (diff)
downloadptxdist-4585d41f5ec80ee704ec474d824ee196af423df2.tar.gz
ptxdist-4585d41f5ec80ee704ec474d824ee196af423df2.tar.xz
ptxd_lib_colgen: handle buildtime/runtime correctly
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_colgen.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_lib_colgen.sh b/scripts/lib/ptxd_lib_colgen.sh
index 1383ad6e1..abbc31841 100644
--- a/scripts/lib/ptxd_lib_colgen.sh
+++ b/scripts/lib/ptxd_lib_colgen.sh
@@ -22,7 +22,7 @@ ptxd_colgen_generate_sections()
$1 ~ /^PTX_MAP_._DEP/ {
pkg = gensub(/PTX_MAP_._DEP_/, "", "g", $1);
- deps[pkg] = $2;
+ deps[pkg] = deps[pkg] " " $2;
next;
}
@@ -53,9 +53,12 @@ ptxd_colgen_generate_sections()
"\t" "default COLLECTION_ALL\n" > col_in;
m = split(deps[pkg], dep, " ");
+ asort(dep, sdep);
+ last = "";
for (j = 1; j <= m; j++) {
- if (dep[j] in module_pkgs)
- print "\tselect " dep[j] > col_in;
+ if (sdep[j] in module_pkgs && sdep[j] != last )
+ print "\tselect " sdep[j] > col_in;
+ last = sdep[j]
}
printf "\n" > col_in;