diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/firstversions.awk | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/scripts/firstversions.awk b/scripts/firstversions.awk index 236d90ec97..7f1c2edf52 100644 --- a/scripts/firstversions.awk +++ b/scripts/firstversions.awk @@ -1,27 +1,36 @@ # Script to preprocess Versions.all lists based on "earliest version" # specifications in the shlib-versions file. -NF == 3 && $2 == ":" { firstversion[$1] = $3; next } +NF > 2 && $2 == ":" { + for (i = 0; i <= NF - 3; ++i) + firstversion[$1, i] = $(3 + i); + idx[$1] = 0; + next; +} NF == 2 && $2 == "{" { thislib = $1; print; next } $1 == "}" { - if (firstversion[thislib]) { + if (firstversion[thislib, idx[thislib]]) { # We haven't seen the stated version, but have produced # others pointing to it, so we synthesize it now. - printf " %s\n", firstversion[thislib]; + printf " %s\n", firstversion[thislib, idx[thislib]]; + idx[thislib]++; } print; next; } { - if (! firstversion[thislib]) + v = firstversion[thislib, idx[thislib]]; + + if (! v) print; - else if ($1 == firstversion[thislib]) { + else if ($1 == v) { print; - firstversion[thislib] = 0; + firstversion[thislib, idx[thislib]] = 0; + idx[thislib]++; } else - print $1, "=", firstversion[thislib]; + print $1, "=", v; } |