1 # Script to generate <abi-versions.h> header file from Versions.all list.
2 # See include/shlib-compat.h comments for explanation.
5 print "/* This file is automatically generated by abi-versions.awk.";
6 print " It defines symbols used by shlib-compat.h, which see. */";
7 print "\n#ifndef _ABI_VERSIONS_H\n#define _ABI_VERSIONS_H";
10 NF ==
2 && $
2 ==
"{" {
12 gsub(/[^A
-Za
-z0
-9_
]/, "_"); libid = $
1;
13 printf "\n/* start %s */\n", thislib
;
19 printf "/* end %s */\n", thislib
;
25 gsub(/[^A
-Za
-z0
-9_
]/, "_");
26 oldid = $
1; newid = $
3;
28 printf "#define ABI_%s_%s\tABI_%s_%s\n", libid
, oldid
, libid
, newid
;
29 printf "#define VERSION_%s_%s\t%s\n", libid
, oldid
, new
;
36 gsub(/[^A
-Za
-z0
-9_
]/, "_");
39 printf "#define ABI_%s_%s\t%d\t/* support %s */\n", libid
, versid
, ++n
, vers
;
40 printf "#define VERSION_%s_%s\t%s\n", libid
, versid
, vers
;
45 print "\n#endif /* abi-versions.h */";