Refer to C23 in place of C2X in glibc
[glibc.git] / scripts / gen-libc-modules.awk
blob2f92cd41b2f1e3cab30ea2bb49bcd89efbd0a890
1 # Generate a header file that defines the MODULE_* macros for each library and
2 # module we build in glibc. The library names are pulled in from soversions.i
3 # and the additional modules are passed in the BUILDLIST variable.
4 BEGIN {
5 # BUILDLIST is set from the build-list variable in Makeconfig and is a space
6 # separated list of non-library modules that we build in glibc.
7 num = split (buildlist, libs, " ")
8 # Separate the built modules from the libraries.
9 libs[++num] = "LIBS_BEGIN"
12 # Skip over comments.
13 $1 == "#" {
14 next
17 # We have only one special case in soversions.i parsing, which is to replace ld
18 # with rtld since that's what we call it throughout the sources.
19 match (FILENAME, ".*soversions.i") {
20 name = $2
21 if (name == "ld")
22 name = "rtld"
24 # Library names are not duplicated in soversions.i.
25 libs[++num] = name
28 # Finally, print out the header file.
29 END {
30 printf ("/* AUTOGENERATED BY gen-libc-modules.awk, DO NOT EDIT. */\n\n")
31 for (l in libs) {
32 printf ("#define MODULE_%s %d\n", libs[l], l)