Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: build/config/ios/write_framework_modulemap.py

Issue 2082573006: [iOS/GN] Replace the last to gyp-mac-tool commands with standalone scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: return 0 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/ios/write_framework_hmap.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/write_framework_modulemap.py
diff --git a/build/config/ios/write_framework_modulemap.py b/build/config/ios/write_framework_modulemap.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6da571282de3853671347b5e3769cf97f4c8cc3
--- /dev/null
+++ b/build/config/ios/write_framework_modulemap.py
@@ -0,0 +1,26 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import sys
+
+def Main(framework):
+ # Find the name of the binary based on the part before the ".framework".
+ binary = os.path.basename(framework).split('.')[0]
+ module_path = os.path.join(framework, 'Modules');
+ if not os.path.exists(module_path):
+ os.mkdir(module_path)
+ module_template = 'framework module %s {\n' \
+ ' umbrella header "%s.h"\n' \
+ '\n' \
+ ' export *\n' \
+ ' module * { export * }\n' \
+ '}\n' % (binary, binary)
+
+ module_file = open(os.path.join(module_path, 'module.modulemap'), 'w')
+ module_file.write(module_template)
+ module_file.close()
+
+if __name__ == '__main__':
+ Main(sys.argv[1])
« no previous file with comments | « build/config/ios/write_framework_hmap.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698