diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-21 07:16:46 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-21 07:16:46 +0000 |
commit | 8eb6f95371ac36d4f5f4f867065c843596f66a67 (patch) | |
tree | 043b28998da75da7f303b081af739fbf560af70f /scripts | |
parent | a4947a1a5386bfee328190507369781092d6cf3a (diff) |
Updated to fedora-glibc-20041021T0701cvs/fedora-glibc-2_3_3-72
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/soversions.awk | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/soversions.awk b/scripts/soversions.awk new file mode 100644 index 0000000000..6207088514 --- /dev/null +++ b/scripts/soversions.awk @@ -0,0 +1,38 @@ +# awk script for shlib-versions.v.i -> soversions.i; see Makeconfig. + +# Only lines matching `config' (set with -v) are relevant to us. +config !~ $1 { next } + +# Obey the first matching DEFAULT line. +$2 == "DEFAULT" { + if (!matched_default) { + matched_default = 1; + $1 = $2 = ""; + default_setname = $0; + } + next +} + +# Collect all lib lines before emitting anything, so DEFAULT +# can be interspersed. +{ + lib = number = $2; + sub(/=.*$/, "", lib); + sub(/^.*=/, "", number); + if (lib in numbers) next; + numbers[lib] = number; + if (NF > 2) { + $1 = $2 = ""; + versions[lib] = $0 + } +} + +END { + for (lib in numbers) { + set = (lib in versions) ? versions[lib] : default_setname; + if (set) + print lib, numbers[lib], set; + else + print lib, numbers[lib]; + } +} |