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

Side by Side Diff: build/SConscript.main

Issue 7807: SCons renaming updates for base, net and googleurl:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
« no previous file with comments | « build/SConscript.googleurl ('k') | build/googleurl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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')
11 if p == 'spinner': 11 if p == 'spinner':
12 Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w')) 12 Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w'))
13 elif p == 'name': 13 elif p == 'name':
14 Progress('$TARGET\r', overwrite=True, file=open('con', 'w')) 14 Progress('$TARGET\r', overwrite=True, file=open('con', 'w'))
15 15
16 16
17 default_warnings = ['no-missing-sconscript', 'no-no-parallel-support'] 17 default_warnings = ['no-missing-sconscript', 'no-no-parallel-support']
18 default_warnings = ['no-no-parallel-support']
18 SetOption('warn', default_warnings + GetOption('warn')) 19 SetOption('warn', default_warnings + GetOption('warn'))
19 20
20 21
21 load = ARGUMENTS.get('LOAD') 22 load = ARGUMENTS.get('LOAD')
22 if load: 23 if load:
23 load = load.split(',') 24 load = load.split(',')
24 else: 25 else:
25 load = [] 26 load = []
26 27
27 28
28 env = Environment( 29 env = Environment(
29 BUILD_TYPE = ARGUMENTS.get('BUILD_TYPE', 'Hammer'), 30 BUILD_TYPE = ARGUMENTS.get('BUILD_TYPE', 'Hammer'),
30 TARGET_ROOT = '#/$BUILD_TYPE', 31 TARGET_ROOT = '#/$BUILD_TYPE',
31 OBJ_ROOT = '$TARGET_ROOT', 32 OBJ_ROOT = '$TARGET_ROOT',
33 ROOT_DIR = '#/..',
32 34
33 LIBS_DIR = '$OBJ_ROOT/Libs', 35 LIBS_DIR = '$OBJ_ROOT/Libs',
34 36
35 BASE_DIR = '$OBJ_ROOT/base', 37 BASE_DIR = '$OBJ_ROOT/base',
36 BREAKPAD_DIR = '$OBJ_ROOT/breakpad', 38 BREAKPAD_DIR = '$OBJ_ROOT/breakpad',
37 CHROME_DIR = '$OBJ_ROOT/chrome', 39 CHROME_DIR = '$OBJ_ROOT/chrome',
38 GEARS_DIR = '$OBJ_ROOT/gears', 40 GEARS_DIR = '$OBJ_ROOT/gears',
39 GOOGLE_UPDATE_DIR = '$OBJ_ROOT/google_update', 41 GOOGLE_UPDATE_DIR = '$OBJ_ROOT/google_update',
40 42 GOOGLEURL_DIR = '$OBJ_ROOT/googleurl',
41 # Work around a limitation (bug?) in SCons in that, when we build
42 # from a different directory, it forces the build targets defined
43 # the SConscript.googleurl file to be relative to that file (i.e.,
44 # here in the build/ directory with us), not relative to the
45 # the SConstruct directory from which SCons was launched. When
46 # we roll forward to a version of SCons that fixes this, we'll
47 # need to revert to the $BUILD_TYPE definition of GOOGLEURL_DIR.
48 #GOOGLEURL_DIR = '$OBJ_ROOT/googleurl',
49 GOOGLEURL_DIR = '#/../build/googleurl',
50
51 NET_DIR = '$OBJ_ROOT/net', 43 NET_DIR = '$OBJ_ROOT/net',
52 RLZ_DIR = '$OBJ_ROOT/rlz', 44 RLZ_DIR = '$OBJ_ROOT/rlz',
53 SANDBOX_DIR = '$OBJ_ROOT/sandbox', 45 SANDBOX_DIR = '$OBJ_ROOT/sandbox',
54 SDCH_DIR = '$OBJ_ROOT/sdch', 46 SDCH_DIR = '$OBJ_ROOT/sdch',
55 SKIA_DIR = '$OBJ_ROOT/skia', 47 SKIA_DIR = '$OBJ_ROOT/skia',
56 TESTING_DIR = '$OBJ_ROOT/testing', 48 TESTING_DIR = '$OBJ_ROOT/testing',
57 THIRD_PARTY_DIR = '$OBJ_ROOT/third_party', 49 THIRD_PARTY_DIR = '$OBJ_ROOT/third_party',
58 V8_DIR = '$OBJ_ROOT/v8', 50 V8_DIR = '$OBJ_ROOT/v8',
59 WEBKIT_DIR = '$OBJ_ROOT/webkit', 51 WEBKIT_DIR = '$OBJ_ROOT/webkit',
60 52
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 if not os.path.exists(target_dir.abspath): 449 if not os.path.exists(target_dir.abspath):
458 Execute(Mkdir(target_dir)) 450 Execute(Mkdir(target_dir))
459 SConsignFile(target_dir.File('.sconsign').abspath) 451 SConsignFile(target_dir.File('.sconsign').abspath)
460 452
461 453
462 # Use timestamps change, followed by MD5 for speed 454 # Use timestamps change, followed by MD5 for speed
463 env.Decider('MD5-timestamp') 455 env.Decider('MD5-timestamp')
464 456
465 457
466 # Overlay things from a layer below. 458 # Overlay things from a layer below.
467 env.Dir('$TARGET_ROOT').addRepository(Dir('..')) 459 env.Dir('$TARGET_ROOT').addRepository(Dir('#/..'))
468 460 env.Dir('$TARGET_ROOT/googleurl').addRepository(env.Dir('$ROOT_DIR/build'))
469 461
470 included = [c for c in load if not c.startswith('-')] 462 included = [c for c in load if not c.startswith('-')]
471 excluded = [c[1:] for c in load if c.startswith('-')] 463 excluded = [c[1:] for c in load if c.startswith('-')]
472 if not included: 464 if not included:
473 included = ['all'] 465 included = ['all']
474 466
475 components = ['all'] 467 components = ['all']
476 468
477 def LoadComponent(c): 469 def LoadComponent(c):
478 components.append(c) 470 components.append(c)
479 return (not GetOption('help') and 471 return (not GetOption('help') and
480 c in included or 472 c in included or
481 ('all' in included and not c in excluded)) 473 ('all' in included and not c in excluded))
482 474
483 sconscripts = [] 475 sconscripts = []
484 476
485 if LoadComponent('base'): 477 if LoadComponent('base'):
486 sconscripts.append('$BASE_DIR/SConscript') 478 sconscripts.append('$BASE_DIR/base.scons')
487 479
488 if LoadComponent('breakpad'): 480 if LoadComponent('breakpad'):
489 sconscripts.append('$BREAKPAD_DIR/SConscript') 481 sconscripts.append('$BREAKPAD_DIR/SConscript')
490 482
491 if LoadComponent('chrome'): 483 if LoadComponent('chrome'):
492 sconscripts.append('$CHROME_DIR/SConscript') 484 sconscripts.append('$CHROME_DIR/SConscript')
493 485
494 if LoadComponent('gears'): 486 if LoadComponent('gears'):
495 sconscripts.append('$GEARS_DIR/SConscript') 487 sconscripts.append('$GEARS_DIR/SConscript')
496 488
497 if LoadComponent('google_update'): 489 if LoadComponent('google_update'):
498 sconscripts.append('$GOOGLE_UPDATE_DIR/SConscript') 490 sconscripts.append('$GOOGLE_UPDATE_DIR/SConscript')
499 491
500 if LoadComponent('googleurl'): 492 if LoadComponent('googleurl'):
501 # googleurl comes from a different repository so we provide the SConscript 493 # googleurl comes from a different repository so we provide the SConscript
502 # file. 494 # file.
503 sconscripts.append('SConscript.googleurl') 495 sconscripts.append('$GOOGLEURL_DIR/googleurl.scons')
504 496
505 if LoadComponent('net'): 497 if LoadComponent('net'):
506 sconscripts.append('$NET_DIR/SConscript') 498 sconscripts.append('$NET_DIR/net.scons')
507 499
508 if LoadComponent('rlz'): 500 if LoadComponent('rlz'):
509 sconscripts.append('$RLZ_DIR/SConscript') 501 sconscripts.append('$RLZ_DIR/SConscript')
510 502
511 if LoadComponent('sandbox'): 503 if LoadComponent('sandbox'):
512 sconscripts.append('$SANDBOX_DIR/src/SConscript') 504 sconscripts.append('$SANDBOX_DIR/src/SConscript')
513 505
514 if LoadComponent('sdch'): 506 if LoadComponent('sdch'):
515 sconscripts.append('$SDCH_DIR/SConscript') 507 sconscripts.append('$SDCH_DIR/SConscript')
516 508
517 if LoadComponent('skia'): 509 if LoadComponent('skia'):
518 sconscripts.append('$SKIA_DIR/SConscript') 510 sconscripts.append('$SKIA_DIR/SConscript')
519 511
520 if LoadComponent('testing'): 512 if LoadComponent('testing'):
521 sconscripts.append('$TESTING_DIR/SConscript.gtest') 513 sconscripts.append('$TESTING_DIR/SConscript.gtest')
522 514
523 if LoadComponent('third_party'): 515 if LoadComponent('third_party'):
524 sconscripts.extend([ 516 sconscripts.extend([
525 '$BSDIFF_DIR/SConscript', 517 '$BSDIFF_DIR/SConscript',
526 '$BZIP2_DIR/SConscript', 518 '$BZIP2_DIR/bzip2.scons',
527 '$ICU38_DIR/SConscript', 519 '$ICU38_DIR/icu38.scons',
528 '$LIBPNG_DIR/SConscript', 520 '$LIBPNG_DIR/libpng.scons',
529 '$LZMA_SDK_DIR/SConscript', 521 '$LZMA_SDK_DIR/SConscript',
530 '$MODP_B64_DIR/SConscript', 522 '$MODP_B64_DIR/modp_b64.scons',
531 '$ZLIB_DIR/SConscript', 523 '$ZLIB_DIR/zlib.scons',
532 ]) 524 ])
533 # Temporary until we get these building on Mac. 525 # Temporary until we get these building on Mac.
534 if env['PLATFORM'] != 'darwin': 526 if env['PLATFORM'] != 'darwin':
535 sconscripts.extend([ 527 sconscripts.extend([
536 '$LIBJPEG_DIR/SConscript', 528 '$LIBJPEG_DIR/SConscript',
537 '$LIBXML_DIR/SConscript', 529 '$LIBXML_DIR/SConscript',
538 '$LIBXSLT_DIR/SConscript', 530 '$LIBXSLT_DIR/SConscript',
539 ]) 531 ])
540 if env['PLATFORM'] in ('posix', 'darwin'): 532 if env['PLATFORM'] in ('posix', 'darwin'):
541 sconscripts.extend([ 533 sconscripts.extend([
542 '$LIBEVENT_DIR/SConscript', 534 '$LIBEVENT_DIR/libevent.scons',
543 ]) 535 ])
544 # 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.
545 if env['PLATFORM'] == 'win32': 537 if env['PLATFORM'] == 'win32':
546 sconscripts.extend([ 538 sconscripts.extend([
547 '$BSPATCH_DIR/SConscript', 539 '$BSPATCH_DIR/SConscript',
548 ]) 540 ])
549 541
550 if LoadComponent('v8') and env.Dir('#/../v8').exists(): 542 if LoadComponent('v8') and env.Dir('#/../v8').exists():
551 env.SConscript('SConscript.v8', 543 env.SConscript('SConscript.v8',
552 exports=['env']) 544 exports=['env'])
(...skipping 27 matching lines...) Expand all
580 initial_indent = ' '*32, 572 initial_indent = ' '*32,
581 subsequent_indent = ' '*32, 573 subsequent_indent = ' '*32,
582 ) 574 )
583 components = tw.fill(', '.join(components)) 575 components = tw.fill(', '.join(components))
584 576
585 Help(help_fmt % components) 577 Help(help_fmt % components)
586 578
587 579
588 Import('build_component') 580 Import('build_component')
589 Default(build_component) 581 Default(build_component)
OLDNEW
« no previous file with comments | « build/SConscript.googleurl ('k') | build/googleurl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698