1 # awk script for soversions.i -> gnu/lib-names.h; see Makeconfig.
3 $1 != "DEFAULT" { multi = 1 }
12 sub(/\.so.*$/, "", extra);
15 soname = lib ".so." $3;
18 soname = "\"" soname "\"";
20 extra = toupper(extra);
22 gsub(/-/, "_", extra);
23 macros[$1 FS lib "_SO"] = soname;
25 macros[$1 FS extra "_SO"] = soname;
29 print "/* This file is automatically generated.";
30 print " It defines macros to allow user program to find the shared";
31 print " library files which come as part of GNU libc. */";
32 print "#ifndef __GNU_LIB_NAMES_H";
33 print "#define __GNU_LIB_NAMES_H 1";
36 pfx = multi ? "# define " : "#define ";
39 line = sprintf("%-40s%s", pfx x[2], macros[elt]);
41 lines[x[1]] = lines[x[1]] "\n" line;
47 # Print these in a fixed order so the result is identical
48 # on both sides of the coin.
49 if (!("WORDSIZE32" in lines))
50 lines["WORDSIZE32"] = lines["DEFAULT"];
51 if (!("WORDSIZE64" in lines))
52 lines["WORDSIZE64"] = lines["DEFAULT"];
53 print "#include <bits/wordsize.h>\n";
54 print "#if __WORDSIZE == 32";
55 cmd = "LC_ALL=C sort"; print lines["WORDSIZE32"] | cmd; close(cmd);
57 cmd = "LC_ALL=C sort"; print lines["WORDSIZE64"] | cmd; close(cmd);
61 cmd = "LC_ALL=C sort"; print lines["DEFAULT"] | cmd; close(cmd);
65 print "#endif /* gnu/lib-names.h */"