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

Unified Diff: Source/build/scripts/make-file-arrays.py

Issue 311343002: Move Source/web/scripts/make-file-arrays.py and add namespace option. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | Source/web/scripts/make-file-arrays.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/make-file-arrays.py
diff --git a/Source/web/scripts/make-file-arrays.py b/Source/build/scripts/make-file-arrays.py
similarity index 96%
rename from Source/web/scripts/make-file-arrays.py
rename to Source/build/scripts/make-file-arrays.py
index be70a9bf804f154e45265925a2fc90b5e69cd2e6..f496d01e6f66e6255de1f178129ff988f4fb433f 100755
--- a/Source/web/scripts/make-file-arrays.py
+++ b/Source/build/scripts/make-file-arrays.py
@@ -85,7 +85,7 @@ def process_file(file_name):
return variable_name, content
-def write_header_file(header_file_name, flag, names_and_contents, namespace='blink'):
+def write_header_file(header_file_name, flag, names_and_contents, namespace):
with open(header_file_name, 'w') as header_file:
if flag:
header_file.write('#if ' + flag + '\n')
@@ -98,7 +98,7 @@ def write_header_file(header_file_name, flag, names_and_contents, namespace='bli
header_file.write('#endif\n')
-def write_cpp_file(cpp_file_name, flag, names_and_contents, header_file_name, namespace='blink'):
+def write_cpp_file(cpp_file_name, flag, names_and_contents, header_file_name, namespace):
with open(cpp_file_name, 'w') as cpp_file:
cpp_file.write('#include "config.h"\n')
cpp_file.write('#include "%s"\n' % os.path.basename(header_file_name))
@@ -134,6 +134,7 @@ def main():
parser.add_option('--out-h', dest='out_header')
parser.add_option('--out-cpp', dest='out_cpp')
parser.add_option('--condition', dest='flag')
+ parser.add_option('--namespace', dest='namespace', default='blink')
(options, args) = parser.parse_args()
if len(args) < 1:
parser.error('Need one or more input files')
@@ -149,8 +150,8 @@ def main():
names_and_contents = [process_file(file_name) for file_name in args]
if options.out_header:
- write_header_file(options.out_header, options.flag, names_and_contents)
- write_cpp_file(options.out_cpp, options.flag, names_and_contents, options.out_header)
+ write_header_file(options.out_header, options.flag, names_and_contents, options.namespace)
+ write_cpp_file(options.out_cpp, options.flag, names_and_contents, options.out_header, options.namespace)
if __name__ == '__main__':
« no previous file with comments | « no previous file | Source/web/scripts/make-file-arrays.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698