--- OpenCL/h_extract 2012/05/05 14:04:25 1.7 +++ OpenCL/h_extract 2012/05/05 14:17:39 1.8 @@ -10,14 +10,14 @@ echo '// autogenerated by h_extract' cat $ALL_H | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/' -) | sort >constiv.h +) >constiv.h # constants that look like enum values ( echo '// autogenerated by h_extract' cat $ALL_H | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/' -) | sort >enumstr.h +) >enumstr.h # error codes ( @@ -25,12 +25,12 @@ echo "const_iv(SUCCESS)" cat $ALL_H | perl -ne 'print "const_iv($1)\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/' -) | sort >errstr.h +) >errstr.h # default constant values to -1 ( echo '// autogenerated by h_extract' - cat constiv.h enumstr.h errstr.h | + cat constiv.h | perl -ne '/const_iv\((.*)\)/ or next; print "#ifndef CL_$1\n#define CL_$1 -1\n#endif\n"' ) | sort >default.h