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

Side by Side Diff: tools/create_sdk.py

Issue 10917051: Deal with mock compilation in dart2js, which was working in the SDK (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 # A script which will be invoked from gyp to create an SDK. 7 # A script which will be invoked from gyp to create an SDK.
8 # 8 #
9 # Usage: create_sdk.py sdk_directory 9 # Usage: create_sdk.py sdk_directory
10 # 10 #
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 # 219 #
220 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. 220 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}.
221 # 221 #
222 222
223 for library in ['_internal', 'compiler', 'config', 'html', 'core', 'coreimpl', 223 for library in ['_internal', 'compiler', 'config', 'html', 'core', 'coreimpl',
224 'crypto', 'isolate', 'json', 'math', 'mirrors', 'uri', 'utf', 224 'crypto', 'isolate', 'json', 'math', 'mirrors', 'uri', 'utf',
225 'web']: 225 'web']:
226 copytree(join(HOME, 'lib', library), join(LIB, library), 226 copytree(join(HOME, 'lib', library), join(LIB, library),
227 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) 227 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh'))
228 228
229 # TODO(dgrove): fix this really ugly hack
230 ReplaceInFiles(
231 [join(LIB, 'compiler', 'implementation', 'lib', 'io.dart')],
232 [('../../../runtime/bin', '../io/runtime')])
233
229 # Create and copy pkg. 234 # Create and copy pkg.
230 PKG = join(SDK_tmp, 'pkg') 235 PKG = join(SDK_tmp, 'pkg')
231 os.makedirs(PKG) 236 os.makedirs(PKG)
232 237
233 # 238 #
234 # Create and populate pkg/{args, intl, logging, unittest} 239 # Create and populate pkg/{args, intl, logging, unittest}
235 # 240 #
236 241
237 for library in ['args', 'dartdoc', 'intl', 'logging', 'unittest']: 242 for library in ['args', 'dartdoc', 'intl', 'logging', 'unittest']:
238 copytree(join(HOME, 'pkg', library), join(PKG, library), 243 copytree(join(HOME, 'pkg', library), join(PKG, library),
239 ignore=ignore_patterns('*.svn', 'doc', 'docs', 244 ignore=ignore_patterns('*.svn', 'doc', 'docs',
240 '*.py', '*.gypi', '*.sh')) 245 '*.py', '*.gypi', '*.sh'))
241 246
Emily Fortuna 2012/08/31 23:45:24 unnecessary newline?
247
242 # Fixup dartdoc 248 # Fixup dartdoc
243 ReplaceInFiles([ 249 ReplaceInFiles([
244 join(PKG, 'dartdoc', 'dartdoc.dart'), 250 join(PKG, 'dartdoc', 'dartdoc.dart'),
245 ], [ 251 ], [
246 ("final bool IN_SDK = false;", 252 ("final bool IN_SDK = false;",
247 "final bool IN_SDK = true;"), 253 "final bool IN_SDK = true;"),
248 ]) 254 ])
249 255
250 256
251 # Create and copy tools. 257 # Create and copy tools.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if revision is not None: 291 if revision is not None:
286 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 292 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
287 f.write(revision + '\n') 293 f.write(revision + '\n')
288 f.close() 294 f.close()
289 295
290 move(SDK_tmp, SDK) 296 move(SDK_tmp, SDK)
291 utils.Touch(os.path.join(SDK, 'create.stamp')) 297 utils.Touch(os.path.join(SDK, 'create.stamp'))
292 298
293 if __name__ == '__main__': 299 if __name__ == '__main__':
294 sys.exit(Main(sys.argv)) 300 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698