diff options
author | Roland McGrath <roland@gnu.org> | 2004-10-21 01:29:31 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2004-10-21 01:29:31 +0000 |
commit | 6d864d156da2e006b309eaa161437eea10fd4684 (patch) | |
tree | 46dca46634b6bf853ea99e8325c4bcecda9a1e22 /scripts/soversions.awk | |
parent | cb57664d297d1669be7887d2e17a1a2128d39af6 (diff) | |
download | glibc-6d864d156da2e006b309eaa161437eea10fd4684.zip glibc-6d864d156da2e006b309eaa161437eea10fd4684.tar.gz glibc-6d864d156da2e006b309eaa161437eea10fd4684.tar.bz2 |
* Makeconfig ($(common-objpfx)shlib-versions.v.i): Check alsocvs/fedora-glibc-20041021T0701
$(config-sysdirs) for shlib-versions files.
* Makeconfig ($(common-objpfx)soversions.i): Replace shell loop with
use of ...
* scripts/soversions.awk: ... this new file. Collect lib info and
match any DEFAULT line before emitting anything, so DEFAULT can come
later in the concatenation of shlib-versions files.
Diffstat (limited to 'scripts/soversions.awk')
-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 0000000..6207088 --- /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]; + } +} |