… | |
… | |
8 | # constants |
8 | # constants |
9 | ( |
9 | ( |
10 | echo '// autogenerated by h_extract' |
10 | echo '// autogenerated by h_extract' |
11 | cat $ALL_H | |
11 | cat $ALL_H | |
12 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/' |
12 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/' |
13 | ) | sort >constiv.h |
13 | ) >constiv.h |
14 | |
14 | |
15 | # constants that look like enum values |
15 | # constants that look like enum values |
16 | ( |
16 | ( |
17 | echo '// autogenerated by h_extract' |
17 | echo '// autogenerated by h_extract' |
18 | cat $ALL_H | |
18 | cat $ALL_H | |
19 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/' |
19 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/' |
20 | ) | sort >enumstr.h |
20 | ) >enumstr.h |
21 | |
21 | |
22 | # error codes |
22 | # error codes |
23 | ( |
23 | ( |
24 | echo '// autogenerated by h_extract' |
24 | echo '// autogenerated by h_extract' |
25 | echo "const_iv(SUCCESS)" |
25 | echo "const_iv(SUCCESS)" |
26 | cat $ALL_H | |
26 | cat $ALL_H | |
27 | perl -ne 'print "const_iv($1)\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/' |
27 | perl -ne 'print "const_iv($1)\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/' |
28 | ) | sort >errstr.h |
28 | ) >errstr.h |
29 | |
29 | |
30 | # default constant values to -1 |
30 | # default constant values to -1 |
31 | ( |
31 | ( |
32 | echo '// autogenerated by h_extract' |
32 | echo '// autogenerated by h_extract' |
33 | cat constiv.h enumstr.h errstr.h | |
33 | cat constiv.h | |
34 | perl -ne '/const_iv\((.*)\)/ or next; print "#ifndef CL_$1\n#define CL_$1 -1\n#endif\n"' |
34 | perl -ne '/const_iv\((.*)\)/ or next; print "#ifndef CL_$1\n#define CL_$1 -1\n#endif\n"' |
35 | ) | sort >default.h |
35 | ) | sort >default.h |
36 | |
36 | |
37 | # *glGet*Info |
37 | # *glGet*Info |
38 | ( |
38 | ( |