Index: tools/generate_shim_headers/generate_shim_headers.py |
diff --git a/tools/generate_shim_headers/generate_shim_headers.py b/tools/generate_shim_headers/generate_shim_headers.py |
index 81c531b2e6a0d55c5efa436954dfc016aa7b2eb6..1b8e27f76827f781aa5b4e1df450cd21b2c429c2 100755 |
--- a/tools/generate_shim_headers/generate_shim_headers.py |
+++ b/tools/generate_shim_headers/generate_shim_headers.py |
@@ -65,7 +65,11 @@ def GeneratorMain(argv): |
if options.outputs: |
yield os.path.join(target_directory, header_filename) |
if options.generate: |
- with open(os.path.join(target_directory, header_filename), 'w') as f: |
+ header_path = os.path.join(target_directory, header_filename) |
+ header_dir = os.path.dirname(header_path) |
+ if not os.path.exists(header_dir): |
+ os.makedirs(header_dir) |
+ with open(header_path, 'w') as f: |
f.write(SHIM_TEMPLATE) |
if options.define: |