2000-03-19 20:36:44 +00:00
|
|
|
# Script to preprocess Versions.all lists based on "earliest version"
|
|
|
|
# specifications in the shlib-versions file.
|
|
|
|
|
2000-03-21 20:36:53 +00:00
|
|
|
NF > 2 && $2 == ":" {
|
|
|
|
for (i = 0; i <= NF - 3; ++i)
|
|
|
|
firstversion[$1, i] = $(3 + i);
|
|
|
|
idx[$1] = 0;
|
|
|
|
next;
|
|
|
|
}
|
2000-03-19 20:36:44 +00:00
|
|
|
|
|
|
|
NF == 2 && $2 == "{" { thislib = $1; print; next }
|
|
|
|
|
|
|
|
$1 == "}" {
|
2000-03-21 20:36:53 +00:00
|
|
|
if (firstversion[thislib, idx[thislib]]) {
|
2000-03-19 20:36:44 +00:00
|
|
|
# We haven't seen the stated version, but have produced
|
|
|
|
# others pointing to it, so we synthesize it now.
|
2000-03-21 20:36:53 +00:00
|
|
|
printf " %s\n", firstversion[thislib, idx[thislib]];
|
|
|
|
idx[thislib]++;
|
2000-03-19 20:36:44 +00:00
|
|
|
}
|
|
|
|
print;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2000-03-21 20:36:53 +00:00
|
|
|
v = firstversion[thislib, idx[thislib]];
|
|
|
|
|
|
|
|
if (! v)
|
2000-03-19 20:36:44 +00:00
|
|
|
print;
|
2000-03-21 20:36:53 +00:00
|
|
|
else if ($1 == v) {
|
2000-03-19 20:36:44 +00:00
|
|
|
print;
|
2000-03-21 20:36:53 +00:00
|
|
|
firstversion[thislib, idx[thislib]] = 0;
|
|
|
|
idx[thislib]++;
|
2000-03-19 20:36:44 +00:00
|
|
|
}
|
|
|
|
else
|
2000-03-21 20:36:53 +00:00
|
|
|
print $1, "=", v;
|
2000-03-19 20:36:44 +00:00
|
|
|
}
|