(glibc.spec): Drop Makefile dep.
[glibc.git] / scripts / soversions.awk
blob6207088514a9878b5a3b6cd6b8ab035c89d0cec7
1 # awk script for shlib-versions.v.i -> soversions.i; see Makeconfig.
3 # Only lines matching `config' (set with -v) are relevant to us.
4 config !~ $1 { next }
6 # Obey the first matching DEFAULT line.
7 $2 == "DEFAULT" {
8 if (!matched_default) {
9 matched_default = 1;
10 $1 = $2 = "";
11 default_setname = $0;
13 next
16 # Collect all lib lines before emitting anything, so DEFAULT
17 # can be interspersed.
19 lib = number = $2;
20 sub(/=.*$/, "", lib);
21 sub(/^.*=/, "", number);
22 if (lib in numbers) next;
23 numbers[lib] = number;
24 if (NF > 2) {
25 $1 = $2 = "";
26 versions[lib] = $0
30 END {
31 for (lib in numbers) {
32 set = (lib in versions) ? versions[lib] : default_setname;
33 if (set)
34 print lib, numbers[lib], set;
35 else
36 print lib, numbers[lib];