1 # awk script for shlib-versions.v -> soversions.i; see Makeconfig.
4 config = cpu
"-" vendor
"-" os
;
5 configs
[config
] =
"DEFAULT";
11 if ((config ~ thiscf
) && !abiname
) {
13 sub(/@CPU@
/, cpu
, abiname
);
14 sub(/@VENDOR@
/, vendor
, abiname
);
15 sub(/@OS@
/, os
, abiname
);
20 # Obey the first matching DEFAULT line.
23 default_set
[++ndefault_set
] = thiscf
"\n" $
0;
27 # Collect all lib lines before emitting anything, so DEFAULT
28 # can be interspersed.
32 sub(/^.
*=
/, "", number
);
33 if ((thiscf
FS lib
) in numbers
) next;
34 numbers
[thiscf
FS lib
] = number
;
35 order
[thiscf
FS lib
] =
++order_n
;
38 versions
[thiscf
FS lib
] = $
0
43 for (elt in numbers
) {
52 set =
(c == config
) ? default_setname
: "";
53 for (i =
1; i
<= ndefault_set
; ++i
) {
54 split(default_set
[i
], x
, "\n");
61 line = set ?
(lib
FS numbers
[elt
] FS set
) : (lib
FS numbers
[elt
]);
62 if (!
((c
FS lib
) in lineorder
) || order
[elt
] < lineorder
[c
FS lib
]) {
63 lineorder
[c
FS lib
] = order
[elt
];
64 lines
[c
FS lib
] = configs
[c
] FS line
;