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

Side by Side Diff: build/SConscript.main

Issue 46037: Have the gyp build use base SCons, not Hammer components, so it can... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « DEPS ('k') | site_scons/site_tools/chromium_builders.py » ('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 if sys.platform == 'win32': 10 if sys.platform == 'win32':
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 # 56 #
57 clvars = Variables('scons.opts', ARGUMENTS) 57 clvars = Variables('scons.opts', ARGUMENTS)
58 clvars.AddVariables( 58 clvars.AddVariables(
59 ('BUILD_TARGET_DIR', '', 'Hammer'), 59 ('BUILD_TARGET_DIR', '', 'Hammer'),
60 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')), 60 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')),
61 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')), 61 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')),
62 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')), 62 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')),
63 ) 63 )
64 64
65 65
66 if ARGUMENTS.get('_GYP'):
67 tool_list = ['chromium_builders']
68 else:
69 tool_list = ['component_setup',
70 'chromium_builders',
71 'chromium_load_component',
72 'MSVSNew']
73
74
66 root_env = Environment( 75 root_env = Environment(
67 # MSVSNew in the base environment? Yes, the point is we can (and 76 # MSVSNew in the base environment? Yes, the point is we can (and
68 # want to) generate Visual Studio project and solution files from 77 # want to) generate Visual Studio project and solution files from
69 # any platform. 78 # any platform.
70 tools = ['component_setup', 79 tools = tool_list,
71 'chromium_builders',
72 'chromium_load_component',
73 'MSVSNew'],
74 variables = clvars, 80 variables = clvars,
75 81
76 # Requested list of system (shared) libraries, from the comma separated 82 # Requested list of system (shared) libraries, from the comma separated
77 # SYSTEM_LIBS command-line argument 83 # SYSTEM_LIBS command-line argument
78 req_system_libs = [], 84 req_system_libs = [],
79 # All supported system libraries, for the help message 85 # All supported system libraries, for the help message
80 all_system_libs = [], 86 all_system_libs = [],
81 87
82 CHROME_SRC_DIR = '$MAIN_DIR/..', 88 CHROME_SRC_DIR = '$MAIN_DIR/..',
83 DESTINATION_ROOT = '$MAIN_DIR/$BUILD_TARGET_DIR', 89 DESTINATION_ROOT = '$MAIN_DIR/$BUILD_TARGET_DIR',
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 189
184 # The list of all leaf (fully described) environments. 190 # The list of all leaf (fully described) environments.
185 environment_list = [] 191 environment_list = []
186 components = [] 192 components = []
187 193
188 # Figure out what SConscript files to load based on the user's request. 194 # Figure out what SConscript files to load based on the user's request.
189 # Default is to load all SConscript files for a full-tree build. 195 # Default is to load all SConscript files for a full-tree build.
190 # The keyword arguments in the call below (base, breakpad, etc.) can be 196 # The keyword arguments in the call below (base, breakpad, etc.) can be
191 # specified in the LOAD= argument to cut down on the build. 197 # specified in the LOAD= argument to cut down on the build.
192 198
199 Default(None) # Reset default target to empty.
193 if root_env.get('_GYP'): 200 if root_env.get('_GYP'):
194 webkit_sconscript = '$WEBKIT_DIR/tools/test_shell/test_shell_main${_GYP}.sco ns' 201 webkit_sconscript = '$WEBKIT_DIR/tools/test_shell/test_shell_main${_GYP}.sco ns'
195 else: 202 else:
196 webkit_sconscript = '$WEBKIT_DIR/webkit_main${_GYP}.scons' 203 webkit_sconscript = '$WEBKIT_DIR/webkit_main${_GYP}.scons'
197 204
198 sconscript_map = dict( 205 sconscript_map = dict(
199 base = '$BASE_DIR/base_main${_GYP}.scons', 206 base = '$BASE_DIR/base_main${_GYP}.scons',
200 breakpad = '$BREAKPAD_DIR/SConscript', 207 breakpad = '$BREAKPAD_DIR/SConscript',
201 chrome = '$CHROME_DIR/chrome_main${_GYP}.scons', 208 chrome = '$CHROME_DIR/chrome_main${_GYP}.scons',
202 gears = '$GEARS_DIR/SConscript', 209 gears = '$GEARS_DIR/SConscript',
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 Help(help_fmt % (components, all_system_libs)) 789 Help(help_fmt % (components, all_system_libs))
783 790
784 # ------------------------------------------------------------------------- 791 # -------------------------------------------------------------------------
785 792
786 # Invoke all the SConscripts in each of the environments that make sense on 793 # Invoke all the SConscripts in each of the environments that make sense on
787 # this host-platform. 794 # this host-platform.
788 BuildComponents(environment_list) 795 BuildComponents(environment_list)
789 796
790 # ------------------------------------------------------------------------- 797 # -------------------------------------------------------------------------
791 798
792 Default(None) # Reset default target to empty. 799 if not root_env.get('_GYP'):
800 modes = GetTargetModes().keys()
793 801
794 modes = GetTargetModes().keys() 802 if set(modes) - set(['msvs', 'xcode']):
803 # There's at least one mode being built besides the platform-
804 # independent 'msvs' or 'xcode' modes. Build the current
805 # build_component's Alias as default--that is, "base" when we're
806 # in the base/ subdirectory, "chrome" under chrome/, etc.
807 Import('build_component')
808 Default(Alias(build_component)) # Set default target based on where built.
795 809
796 if set(modes) - set(['msvs', 'xcode']): 810 if 'msvs' in modes:
797 # There's at least one mode being built besides the platform- 811 # We're in --mode=msvs, so add its Alias(es) to the default targets.
798 # independent 'msvs' or 'xcode' modes. Build the current 812 Default(Alias('msvs'))
799 # build_component's Alias as default--that is, "base" when we're
800 # in the base/ subdirectory, "chrome" under chrome/, etc.
801 Import('build_component')
802 Default(Alias(build_component)) # Set default target based on where built.
803
804 if 'msvs' in modes:
805 # We're in --mode=msvs, so add its Alias(es) to the default targets.
806 Default(Alias('msvs'))
807 813
808 # ------------------------------------------------------------------------- 814 # -------------------------------------------------------------------------
809 815
810 # This must occur after BuildComponents so that the dependency graph 816 # This must occur after BuildComponents so that the dependency graph
811 # will be populated. 817 # will be populated.
812 vs_env = windows_env.Clone() 818 vs_env = windows_env.Clone()
813 vs_env.Append(COMPONENT_VS_SOURCE_SUFFIXES = [ 819 vs_env.Append(COMPONENT_VS_SOURCE_SUFFIXES = [
814 '.def', 820 '.def',
815 '.ini', 821 '.ini',
816 '.txt', 822 '.txt',
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 'all_libraries', 865 'all_libraries',
860 'all_languages', 866 'all_languages',
861 'all_programs', 867 'all_programs',
862 'all_test_programs', 868 'all_test_programs',
863 ], projects = [p], 869 ], projects = [p],
864 COMPONENT_VS_PROJECT_SCRIPT_PATH=( 870 COMPONENT_VS_PROJECT_SCRIPT_PATH=(
865 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), 871 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'),
866 ) 872 )
867 873
868 # ------------------------------------------------------------------------- 874 # -------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « DEPS ('k') | site_scons/site_tools/chromium_builders.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698