| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 import shutil | 6 import shutil |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 | 9 |
| 10 p = ARGUMENTS.get('PROGRESS') | 10 p = ARGUMENTS.get('PROGRESS') |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 load = ARGUMENTS.get('LOAD') | 22 load = ARGUMENTS.get('LOAD') |
| 23 if load: | 23 if load: |
| 24 load = load.split(',') | 24 load = load.split(',') |
| 25 else: | 25 else: |
| 26 load = [] | 26 load = [] |
| 27 | 27 |
| 28 | 28 |
| 29 env = Environment( | 29 env = Environment( |
| 30 BUILD_TYPE = ARGUMENTS.get('BUILD_TYPE', 'Hammer'), | 30 BUILD_TYPE = ARGUMENTS.get('BUILD_TYPE', 'Hammer'), |
| 31 TARGET_ROOT = '#/$BUILD_TYPE', | 31 CHROME_SRC_DIR = Dir('#/..').abspath, |
| 32 TARGET_ROOT = Dir('#/$BUILD_TYPE').abspath, |
| 32 OBJ_ROOT = '$TARGET_ROOT', | 33 OBJ_ROOT = '$TARGET_ROOT', |
| 33 ROOT_DIR = '#/..', | |
| 34 | 34 |
| 35 LIBS_DIR = '$OBJ_ROOT/Libs', | 35 LIBS_DIR = '$OBJ_ROOT/Libs', |
| 36 | 36 |
| 37 BASE_DIR = '$OBJ_ROOT/base', | 37 BASE_DIR = '$OBJ_ROOT/base', |
| 38 BREAKPAD_DIR = '$OBJ_ROOT/breakpad', | 38 BREAKPAD_DIR = '$OBJ_ROOT/breakpad', |
| 39 CHROME_DIR = '$OBJ_ROOT/chrome', | 39 CHROME_DIR = '$OBJ_ROOT/chrome', |
| 40 GEARS_DIR = '$OBJ_ROOT/gears', | 40 GEARS_DIR = '$OBJ_ROOT/gears', |
| 41 GOOGLE_UPDATE_DIR = '$OBJ_ROOT/google_update', | 41 GOOGLE_UPDATE_DIR = '$OBJ_ROOT/google_update', |
| 42 GOOGLEURL_DIR = '$OBJ_ROOT/googleurl', | 42 GOOGLEURL_DIR = '$OBJ_ROOT/googleurl', |
| 43 NET_DIR = '$OBJ_ROOT/net', | 43 NET_DIR = '$OBJ_ROOT/net', |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 if not os.path.exists(target_dir.abspath): | 449 if not os.path.exists(target_dir.abspath): |
| 450 Execute(Mkdir(target_dir)) | 450 Execute(Mkdir(target_dir)) |
| 451 SConsignFile(target_dir.File('.sconsign').abspath) | 451 SConsignFile(target_dir.File('.sconsign').abspath) |
| 452 | 452 |
| 453 | 453 |
| 454 # Use timestamps change, followed by MD5 for speed | 454 # Use timestamps change, followed by MD5 for speed |
| 455 env.Decider('MD5-timestamp') | 455 env.Decider('MD5-timestamp') |
| 456 | 456 |
| 457 | 457 |
| 458 # Overlay things from a layer below. | 458 # Overlay things from a layer below. |
| 459 env.Dir('$TARGET_ROOT').addRepository(Dir('#/..')) | 459 env.Dir('$TARGET_ROOT').addRepository(env.Dir('$CHROME_SRC_DIR')) |
| 460 env.Dir('$TARGET_ROOT/googleurl').addRepository(env.Dir('$ROOT_DIR/build')) | 460 env.Dir('$TARGET_ROOT/googleurl').addRepository(env.Dir('$CHROME_SRC_DIR/build')
) |
| 461 | 461 |
| 462 included = [c for c in load if not c.startswith('-')] | 462 included = [c for c in load if not c.startswith('-')] |
| 463 excluded = [c[1:] for c in load if c.startswith('-')] | 463 excluded = [c[1:] for c in load if c.startswith('-')] |
| 464 if not included: | 464 if not included: |
| 465 included = ['all'] | 465 included = ['all'] |
| 466 | 466 |
| 467 components = ['all'] | 467 components = ['all'] |
| 468 | 468 |
| 469 def LoadComponent(c): | 469 def LoadComponent(c): |
| 470 components.append(c) | 470 components.append(c) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 if env['PLATFORM'] in ('posix', 'darwin'): | 532 if env['PLATFORM'] in ('posix', 'darwin'): |
| 533 sconscripts.extend([ | 533 sconscripts.extend([ |
| 534 '$LIBEVENT_DIR/libevent.scons', | 534 '$LIBEVENT_DIR/libevent.scons', |
| 535 ]) | 535 ]) |
| 536 # This is temporary until we get this lib to build on other platforms. | 536 # This is temporary until we get this lib to build on other platforms. |
| 537 if env['PLATFORM'] == 'win32': | 537 if env['PLATFORM'] == 'win32': |
| 538 sconscripts.extend([ | 538 sconscripts.extend([ |
| 539 '$BSPATCH_DIR/SConscript', | 539 '$BSPATCH_DIR/SConscript', |
| 540 ]) | 540 ]) |
| 541 | 541 |
| 542 if LoadComponent('v8') and env.Dir('#/../v8').exists(): | 542 if LoadComponent('v8') and env.Dir('$CHROME_SRC_DIR/v8').exists(): |
| 543 env.SConscript('SConscript.v8', | 543 env.SConscript('SConscript.v8', |
| 544 exports=['env']) | 544 exports=['env']) |
| 545 | 545 |
| 546 if LoadComponent('webkit'): | 546 if LoadComponent('webkit'): |
| 547 sconscripts.append('$WEBKIT_DIR/SConscript') | 547 sconscripts.append('$WEBKIT_DIR/SConscript') |
| 548 | 548 |
| 549 env.SConscript(sconscripts, exports=['env']) | 549 env.SConscript(sconscripts, exports=['env']) |
| 550 | 550 |
| 551 | 551 |
| 552 help_fmt = """ | 552 help_fmt = """ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 572 initial_indent = ' '*32, | 572 initial_indent = ' '*32, |
| 573 subsequent_indent = ' '*32, | 573 subsequent_indent = ' '*32, |
| 574 ) | 574 ) |
| 575 components = tw.fill(', '.join(components)) | 575 components = tw.fill(', '.join(components)) |
| 576 | 576 |
| 577 Help(help_fmt % components) | 577 Help(help_fmt % components) |
| 578 | 578 |
| 579 | 579 |
| 580 Import('build_component') | 580 Import('build_component') |
| 581 Default(build_component) | 581 Default(build_component) |
| OLD | NEW |