浏览代码

fix amalgation script for pcg_32

now amalgation also detects #endifs as closing header with "//"-comments
Markus Graube 9 年之前
父节点
当前提交
87580bd212
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)