Explorar o código

fix amalgation script for pcg_32

now amalgation also detects #endifs as closing header with "//"-comments
Markus Graube %!s(int64=9) %!d(string=hai) anos
pai
achega
87580bd212
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tools/amalgamate.py

+ 1 - 1
tools/amalgamate.py

@@ -18,7 +18,7 @@ pos = outname.find(".")
 if pos > 0:
     outname = outname[:pos]
 include_re = re.compile("^#include (\".*\").*$")
-guard_re = re.compile("^#(?:(?:ifndef|define) [A-Z_]+_H_|endif /\* [A-Z_]+_H_ \*/)")
+guard_re = re.compile("^#(?:(?:ifndef|define) [A-Z_]+_H_|endif /\* [A-Z_]+_H_ \*/|endif // [A-Z_]+_H_)")
 includes = []
 
 print ("Starting amalgamating file "+ args.outfile)