aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2017-02-14 23:28:27 +0200
committerOskari Timperi <oskari.timperi@iki.fi>2017-02-14 23:28:27 +0200
commit92536c7325aa43d43d4cca69b1dc5322cea76ecc (patch)
tree4b4a8d1c6ef63d7a5390f66f8bb5d79f1e9a1ed6 /tools
parent90d1f4ae1b1820facd786b84dc5a35eebd4195d1 (diff)
downloadmqtt-92536c7325aa43d43d4cca69b1dc5322cea76ecc.tar.gz
mqtt-92536c7325aa43d43d4cca69b1dc5322cea76ecc.zip
Fix amalgamation and includes under src/lib
Diffstat (limited to 'tools')
-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()