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