aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/amalgamate.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/amalgamate.py b/tools/amalgamate.py
index 5ad71a0..3337823 100644
--- a/tools/amalgamate.py
+++ b/tools/amalgamate.py
@@ -45,6 +45,14 @@ def read_file(filename):
pass
else:
continue
+ elif line.startswith('#include <'):
+ header = line[10:]
+ idx = header.find('>')
+ if idx > 0:
+ header = header[:idx]
+ header = os.path.join(src_dir, 'lib', header)
+ if os.path.isfile(header):
+ continue
buf.write(tounicode(line))
return buf.getvalue()