-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Makeconfig ($(common-objpfx)shlib-versions.v.i): Check also
$(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.
- Loading branch information
Roland McGrath
committed
Oct 21, 2004
1 parent
cb57664
commit 6d864d1
Showing
3 changed files
with
59 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]; | ||
} | ||
} |