소스 검색

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)