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

Side by Side Diff: Source/build/scripts/action_makenames.py

Issue 26414004: Move core/scripts to build/scripts so that platform can use them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (C) 2009 Google Inc. All rights reserved. 3 # Copyright (C) 2009 Google Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 continue 134 continue
135 else: 135 else:
136 assert False 136 assert False
137 137
138 assert makeNamesInput != None 138 assert makeNamesInput != None
139 assert tagInput != None or attrInput != None or eventsInput != None or ('--f onts' in options) 139 assert tagInput != None or attrInput != None or eventsInput != None or ('--f onts' in options)
140 140
141 # scriptsPath is a Perl include directory, located relative to 141 # scriptsPath is a Perl include directory, located relative to
142 # makeNamesInput. 142 # makeNamesInput.
143 scriptsPath = os.path.normpath( 143 scriptsPath = os.path.normpath(
144 os.path.join(os.path.dirname(makeNamesInput), os.pardir, 'scripts')) 144 os.path.join(os.path.dirname(makeNamesInput), os.pardir, '../build/scrip ts'))
145 145
146 # Change to the output directory because make_names.pl puts output in its 146 # Change to the output directory because make_names.pl puts output in its
147 # working directory. 147 # working directory.
148 os.chdir(outputDir) 148 os.chdir(outputDir)
149 149
150 # Build up the command. 150 # Build up the command.
151 command = ['perl', '-I', scriptsPath, makeNamesInput] 151 command = ['perl', '-I', scriptsPath, makeNamesInput]
152 if tagInput != None: 152 if tagInput != None:
153 command.extend(['--tags', tagInput]) 153 command.extend(['--tags', tagInput])
154 if attrInput != None: 154 if attrInput != None:
(...skipping 17 matching lines...) Expand all
172 src = os.path.join(outputDir, outputBasename) 172 src = os.path.join(outputDir, outputBasename)
173 dst = os.path.join(thisOutputDir, outputBasename) 173 dst = os.path.join(thisOutputDir, outputBasename)
174 shutil.copyfile(src, dst) 174 shutil.copyfile(src, dst)
175 os.unlink(src) 175 os.unlink(src)
176 176
177 return returnCode 177 return returnCode
178 178
179 179
180 if __name__ == '__main__': 180 if __name__ == '__main__':
181 sys.exit(main(sys.argv)) 181 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698