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

Side by Side Diff: build/SConscript.main

Issue 13087: Parameterize the "Hammer" subdirectory name in which we build as... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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 # 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 if sys.platform == 'win32':
11 console = 'con'
12 else:
13 console = '/dev/tty'
10 p = ARGUMENTS.get('PROGRESS') 14 p = ARGUMENTS.get('PROGRESS')
11 if p == 'spinner': 15 if p == 'spinner':
12 Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w')) 16 Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open(console, 'w'))
13 elif p == 'name': 17 elif p == 'name':
14 Progress('$TARGET\r', overwrite=True, file=open('con', 'w')) 18 Progress('$TARGET\r', overwrite=True, file=open(console, 'w'))
15 19
16 20
17 default_warnings = ['no-missing-sconscript', 'no-no-parallel-support'] 21 default_warnings = ['no-missing-sconscript', 'no-no-parallel-support']
18 default_warnings = ['no-no-parallel-support'] 22 default_warnings = ['no-no-parallel-support']
19 SetOption('warn', default_warnings + GetOption('warn')) 23 SetOption('warn', default_warnings + GetOption('warn'))
20 24
21 25
22 # Variables for controlling the build. 26 # Variables for controlling the build.
23 # 27 #
24 # The following variables can be set either on the command line 28 # The following variables can be set either on the command line
25 # or in the external environment when executing SCons, with the 29 # or in the external environment when executing SCons, with the
26 # command line overriding any environment setting. 30 # command line overriding any environment setting.
27 # 31 #
32 # BUILD_TARGET_DIR
33 # Specifies the target subdirectory name in which we'll
34 # build everything. This is intended to mimic the Visual
35 # Visual Studio "Debug\" and "Release\" subdirectories.
36 # The default value is "Hammer."
37 #
38 #
28 # CHROME_BUILD_TYPE 39 # CHROME_BUILD_TYPE
29 # When set, applies settings from the file 40 # When set, applies settings from the file
30 # build\internal\release_impl${CHROME_BUILD_TYPE}.scons 41 # build\internal\release_impl${CHROME_BUILD_TYPE}.scons
31 # to be applied to the construction environment. 42 # to be applied to the construction environment.
32 # 43 #
33 # CHROMIUM_BUILD 44 # CHROMIUM_BUILD
34 # When set, applies settings from the file 45 # When set, applies settings from the file
35 # build\internal\chromium_build${CHROMIUM_BUILD}.scons 46 # build\internal\chromium_build${CHROMIUM_BUILD}.scons
36 # to be applied to the construction environment. 47 # to be applied to the construction environment.
37 # 48 #
38 # INCREMENTAL 49 # INCREMENTAL
39 # Controls whether or not libraries and executable programs are 50 # Controls whether or not libraries and executable programs are
40 # linked incrementally. When set to any True value (1, T, y, True), 51 # linked incrementally. When set to any True value (1, T, y, True),
41 # uses the /INCREMENTAL flag to the Microsoft linker. An 52 # uses the /INCREMENTAL flag to the Microsoft linker. An
42 # explicit False value (0, f, N, false) uses the /INCREMENTAL:NO. 53 # explicit False value (0, f, N, false) uses the /INCREMENTAL:NO.
43 # When not set, the default is to link debug (developer) builds 54 # When not set, the default is to link debug (developer) builds
44 # incrementally, but release builds use full links. 55 # incrementally, but release builds use full links.
45 # 56 #
46 clvars = Variables('scons.opts', ARGUMENTS) 57 clvars = Variables('scons.opts', ARGUMENTS)
47 clvars.AddVariables( 58 clvars.AddVariables(
59 ('BUILD_TARGET_DIR', '', 'Hammer'),
48 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')), 60 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')),
49 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')), 61 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')),
50 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')), 62 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')),
51 ) 63 )
52 64
53 65
54 root_env = Environment( 66 root_env = Environment(
55 tools = ['component_setup', 67 tools = ['component_setup',
56 'chromium_builders', 68 'chromium_builders',
57 'chromium_load_component'], 69 'chromium_load_component'],
58 variables = clvars, 70 variables = clvars,
59 71
60 # Requested list of system (shared) libraries, from the comma separated 72 # Requested list of system (shared) libraries, from the comma separated
61 # SYSTEM_LIBS command-line argument 73 # SYSTEM_LIBS command-line argument
62 req_system_libs = [], 74 req_system_libs = [],
63 # All supported system libraries, for the help message 75 # All supported system libraries, for the help message
64 all_system_libs = [], 76 all_system_libs = [],
65 77
66 CHROME_SRC_DIR = '$MAIN_DIR/..', 78 CHROME_SRC_DIR = '$MAIN_DIR/..',
67 DESTINATION_ROOT = '$MAIN_DIR/Hammer', 79 DESTINATION_ROOT = '$MAIN_DIR/$BUILD_TARGET_DIR',
68 80
69 # Where ComponentTestProgram() will build test executables. 81 # Where ComponentTestProgram() will build test executables.
70 TESTS_DIR = '$DESTINATION_ROOT', 82 TESTS_DIR = '$DESTINATION_ROOT',
71 83
72 # Where ComponentProgram() will build program executables. 84 # Where ComponentProgram() will build program executables.
73 STAGING_DIR = '$DESTINATION_ROOT', 85 STAGING_DIR = '$DESTINATION_ROOT',
74 86
75 # Where ComponentLibrary() will build libraries. 87 # Where ComponentLibrary() will build libraries.
76 LIBS_DIR = '$COMPONENT_LIBRARY_DIR', 88 LIBS_DIR = '$COMPONENT_LIBRARY_DIR',
77 89
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 FRAMEWORKS = [ 593 FRAMEWORKS = [
582 'AppKit', 594 'AppKit',
583 'ApplicationServices', 595 'ApplicationServices',
584 'Foundation', 596 'Foundation',
585 ], 597 ],
586 598
587 ICU_LIBS = ['icui18n', 'icuuc', 'icudata'], 599 ICU_LIBS = ['icui18n', 'icuuc', 'icudata'],
588 ) 600 )
589 601
590 602
591 # Add --clobber (for the buildbot).
592 # NOTE: seems to be crucial to do this before any builders are invoked.
593 AddOption('--clobber', action='store_true', dest='clobber', default=False,
594 help='Delete build directory before building.')
595 if GetOption('clobber'):
596 shutil.rmtree(root_env.Dir('$DESTINATION_ROOT').abspath, True)
597 # sconsign file gets put here at the moment.
598 shutil.rmtree(root_env.Dir('$MAIN_DIR/scons-out').abspath, True)
599
600
601
602 # ------------------------------------------------------------------------- 603 # -------------------------------------------------------------------------
603 604
604 605
605 # Overlay things from a layer below. 606 # Overlay things from a layer below.
606 for env in environment_list: 607 for env in environment_list:
607 env.Dir('$OBJ_ROOT').addRepository(env.Dir('$CHROME_SRC_DIR')) 608 env.Dir('$OBJ_ROOT').addRepository(env.Dir('$CHROME_SRC_DIR'))
608 env.Dir('$OBJ_ROOT/googleurl').addRepository(env.Dir('$CHROME_SRC_DIR/build')) 609 env.Dir('$OBJ_ROOT/googleurl').addRepository(env.Dir('$CHROME_SRC_DIR/build'))
609 610
610 # We pre-resolve some common targets. We end up spending lots of time 611 # We pre-resolve some common targets. We end up spending lots of time
611 # resolving these over and over again. 612 # resolving these over and over again.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 'all_libraries', 713 'all_libraries',
713 'all_languages', 714 'all_languages',
714 'all_programs', 715 'all_programs',
715 'all_test_programs', 716 'all_test_programs',
716 ], projects = [p], 717 ], projects = [p],
717 COMPONENT_VS_PROJECT_SCRIPT_PATH=( 718 COMPONENT_VS_PROJECT_SCRIPT_PATH=(
718 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), 719 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'),
719 ) 720 )
720 721
721 # ------------------------------------------------------------------------- 722 # -------------------------------------------------------------------------
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