2004-12-22 20:10:10 +00:00
|
|
|
# awk script for shlib-versions.v.i -> soversions.i; see Makeconfig.
|
2004-10-21 01:29:31 +00:00
|
|
|
|
2004-12-22 20:10:10 +00:00
|
|
|
# Only lines matching `config' (set with -v) are relevant to us.
|
|
|
|
config !~ $1 { next }
|
2004-10-21 01:29:31 +00:00
|
|
|
|
|
|
|
# Obey the first matching DEFAULT line.
|
|
|
|
$2 == "DEFAULT" {
|
2004-12-22 20:10:10 +00:00
|
|
|
if (!matched_default) {
|
|
|
|
matched_default = 1;
|
|
|
|
$1 = $2 = "";
|
|
|
|
default_setname = $0;
|
|
|
|
}
|
2004-10-21 01:29:31 +00:00
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
# Collect all lib lines before emitting anything, so DEFAULT
|
|
|
|
# can be interspersed.
|
|
|
|
{
|
|
|
|
lib = number = $2;
|
|
|
|
sub(/=.*$/, "", lib);
|
|
|
|
sub(/^.*=/, "", number);
|
2004-12-22 20:10:10 +00:00
|
|
|
if (lib in numbers) next;
|
|
|
|
numbers[lib] = number;
|
2004-10-21 01:29:31 +00:00
|
|
|
if (NF > 2) {
|
|
|
|
$1 = $2 = "";
|
2004-12-22 20:10:10 +00:00
|
|
|
versions[lib] = $0
|
2004-10-21 01:29:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2004-12-22 20:10:10 +00:00
|
|
|
for (lib in numbers) {
|
|
|
|
set = (lib in versions) ? versions[lib] : default_setname;
|
|
|
|
if (set)
|
|
|
|
print lib, numbers[lib], set;
|
|
|
|
else
|
|
|
|
print lib, numbers[lib];
|
2004-10-21 01:29:31 +00:00
|
|
|
}
|
|
|
|
}
|