2005-02-10 09:18:34 +00:00
|
|
|
# awk script for soversions.i -> gnu/lib-names.h; see Makeconfig.
|
|
|
|
|
|
|
|
#
|
|
|
|
{
|
2012-05-26 17:46:59 +00:00
|
|
|
split($1, fields, "=")
|
|
|
|
lib = fields[1];
|
|
|
|
soname = version = fields[2];
|
|
|
|
sub(/^.*=/, "", soname);
|
|
|
|
sub(/^lib.*\.so\./, "", version);
|
|
|
|
if ($soname !~ /^lib/) {
|
|
|
|
extra = soname;
|
2005-02-10 09:18:34 +00:00
|
|
|
sub(/\.so.*$/, "", extra);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
extra = "";
|
|
|
|
}
|
|
|
|
soname = "\"" soname "\"";
|
|
|
|
lib = toupper(lib);
|
|
|
|
extra = toupper(extra);
|
|
|
|
gsub(/-/, "_", lib);
|
|
|
|
gsub(/-/, "_", extra);
|
|
|
|
macros[$1 FS lib "_SO"] = soname;
|
|
|
|
if (extra)
|
|
|
|
macros[$1 FS extra "_SO"] = soname;
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
for (elt in macros) {
|
|
|
|
split(elt, x);
|
2012-05-26 17:46:59 +00:00
|
|
|
pfx = multi ? "# define " : "#define ";
|
|
|
|
printf("%-40s%s\n", pfx x[2], macros[elt]);
|
2005-02-10 09:18:34 +00:00
|
|
|
}
|
|
|
|
}
|