1 # Script to generate <abi-versions.h> header file from Versions.all list.
2 # See include/shlib-compat.h comments for explanation.
4 # This script expects the following variables to be defined:
5 # oldest_abi the oldest ABI supported
8 print "/* This file is automatically generated by abi-versions.awk.";
9 print " It defines symbols used by shlib-compat.h, which see. */";
10 print "\n#ifndef _ABI_VERSIONS_H\n#define _ABI_VERSIONS_H";
13 NF ==
2 && $
2 ==
"{" {
15 gsub(/[^A
-Za
-z0
-9_
]/, "_"); libid = $
1;
16 printf "\n/* start %s */\n", thislib
;
22 printf "/* end %s */\n", thislib
;
28 gsub(/[^A
-Za
-z0
-9_
]/, "_");
29 oldid = $
1; newid = $
3;
31 printf "#define ABI_%s_%s\tABI_%s_%s\n", libid
, oldid
, libid
, newid
;
32 printf "#define VERSION_%s_%s\t%s\n", libid
, oldid
, new
;
34 if ("GLIBC_" oldest_abi == old
)
35 oldest_abi =
"default";
41 gsub(/[^A
-Za
-z0
-9_
]/, "_");
44 printf "#define ABI_%s_%s\t%d\t/* support %s */\n", libid
, versid
, ++n
, vers
;
45 printf "#define VERSION_%s_%s\t%s\n", libid
, versid
, vers
;
46 if ("GLIBC_" oldest_abi == vers
)
48 if (start ==
0 && oldest_abi
!= "default")
54 print "\n#endif /* abi-versions.h */";