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

Side by Side Diff: build/SConscript.main

Issue 9259: Adding visual studio solution files.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | build/SConscript.v8 » ('j') | site_scons/site_tools/visual_studio_solution.py » ('J')
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')
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 PERL_INCLUDE_SUFFIX = '', 78 PERL_INCLUDE_SUFFIX = '',
79 _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, ' 79 _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, '
80 'PERL_INCLUDE_PATH, ' 80 'PERL_INCLUDE_PATH, '
81 'PERL_INCLUDE_SUFFIX,' 81 'PERL_INCLUDE_SUFFIX,'
82 '__env__, RDirs, TARGET, SOURCE)}'), 82 '__env__, RDirs, TARGET, SOURCE)}'),
83 ) 83 )
84 84
85 root_env.Append(LIBPATH = ['$V8_DIR']) 85 root_env.Append(LIBPATH = ['$V8_DIR'])
86 86
87 87
88 # Declare a bit to gate solution generation.
89 # The actual generation must be at the end.
90 DeclareBit('solution', 'Generate a solution file')
91 root_env.SetBitFromOption('solution', False)
92
88 93
89 def ChromeProgram(env, *args, **kw): 94 def ChromeProgram(env, *args, **kw):
90 return env.ComponentProgram(*args, **kw) 95 return env.ComponentProgram(*args, **kw)
91 root_env.AddMethod(ChromeProgram) 96 root_env.AddMethod(ChromeProgram)
92 97
93 def ChromeTestProgram(env, *args, **kw): 98 def ChromeTestProgram(env, *args, **kw):
94 return env.ComponentTestProgram(*args, **kw) 99 return env.ComponentTestProgram(*args, **kw)
95 root_env.AddMethod(ChromeTestProgram) 100 root_env.AddMethod(ChromeTestProgram)
96 101
97 def ChromeStaticLibrary(env, *args, **kw): 102 def ChromeStaticLibrary(env, *args, **kw):
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 # googleurl comes from a different repository so we provide the SConscript 181 # googleurl comes from a different repository so we provide the SConscript
177 # file. 182 # file.
178 sconscripts.append('$GOOGLEURL_DIR/googleurl.scons') 183 sconscripts.append('$GOOGLEURL_DIR/googleurl.scons')
179 184
180 if LoadComponent('net'): 185 if LoadComponent('net'):
181 sconscripts.append('$NET_DIR/net.scons') 186 sconscripts.append('$NET_DIR/net.scons')
182 187
183 if LoadComponent('rlz'): 188 if LoadComponent('rlz'):
184 sconscripts.append('$RLZ_DIR/SConscript') 189 sconscripts.append('$RLZ_DIR/SConscript')
185 190
186 if LoadComponent('sandbox'): 191 # TODO(bradnelson): fix solution generation for sandbox.
192 # The solution generator blows up on some of the tests in sandbox.
193 # For now, disable sandbox for solution generation.
194 if LoadComponent('sandbox') and not root_env.Bit('solution'):
187 sconscripts.append('$SANDBOX_DIR/sandbox.scons') 195 sconscripts.append('$SANDBOX_DIR/sandbox.scons')
188 196
189 if LoadComponent('sdch'): 197 if LoadComponent('sdch'):
190 sconscripts.append('$SDCH_DIR/SConscript') 198 sconscripts.append('$SDCH_DIR/SConscript')
191 199
192 if LoadComponent('skia'): 200 if LoadComponent('skia'):
193 sconscripts.append('$SKIA_DIR/SConscript') 201 sconscripts.append('$SKIA_DIR/SConscript')
194 202
195 if LoadComponent('testing'): 203 if LoadComponent('testing'):
196 sconscripts.append('$TESTING_DIR/SConscript.gtest') 204 sconscripts.append('$TESTING_DIR/SConscript.gtest')
197 205
198 if LoadComponent('third_party'): 206 if LoadComponent('third_party'):
199 sconscripts.extend([ 207 sconscripts.extend([
200 '$BSDIFF_DIR/SConscript', 208 '$BSDIFF_DIR/SConscript',
201 '$BZIP2_DIR/bzip2.scons', 209 '$BZIP2_DIR/bzip2.scons',
202 '$ICU38_DIR/icu38.scons', 210 '$ICU38_DIR/icu38.scons',
203 '$LIBPNG_DIR/libpng.scons', 211 '$LIBPNG_DIR/libpng.scons',
204 '$LZMA_SDK_DIR/SConscript', 212 '$LZMA_SDK_DIR/SConscript',
205 '$MODP_B64_DIR/modp_b64.scons', 213 '$MODP_B64_DIR/modp_b64.scons',
206 '$ZLIB_DIR/zlib.scons', 214 '$ZLIB_DIR/zlib.scons',
207 '$LIBJPEG_DIR/SConscript', 215 '$LIBJPEG_DIR/SConscript',
208 '$LIBXML_DIR/SConscript', 216 '$LIBXML_DIR/SConscript',
209 '$LIBXSLT_DIR/SConscript', 217 '$LIBXSLT_DIR/SConscript',
210 '$BSPATCH_DIR/SConscript', 218 '$BSPATCH_DIR/SConscript',
211 ]) 219 ])
212 220
213 if LoadComponent('v8') and root_env.Dir('$CHROME_SRC_DIR/v8').exists(): 221 if LoadComponent('v8') and root_env.Dir('$CHROME_SRC_DIR/v8').exists():
214 sconscripts.append('build/SConscript.v8') 222 sconscripts.append('$OBJ_ROOT/build/SConscript.v8')
215 223
216 if LoadComponent('webkit'): 224 if LoadComponent('webkit'):
217 sconscripts.append('$WEBKIT_DIR/SConscript') 225 sconscripts.append('$WEBKIT_DIR/SConscript')
218 226
219 227
220 # Add the final list into the root environment to be build in BuildComponents. 228 # Add the final list into the root environment to be build in BuildComponents.
221 root_env.Append(BUILD_SCONSCRIPTS = sconscripts) 229 root_env.Append(BUILD_SCONSCRIPTS = sconscripts)
222 230
223 231
224 232
225 # -------------------------------------------------------------------------- 233 # --------------------------------------------------------------------------
226 # Windows specific 234 # Windows specific
227 235
228 windows_env = root_env.Clone() 236 windows_env = root_env.Clone()
229 environment_list.append(windows_env) 237 environment_list.append(windows_env)
230 windows_env.Tool('target_platform_windows') 238 windows_env.Tool('target_platform_windows')
231 windows_env.Tool('target_debug') 239 windows_env.Tool('target_debug')
232 windows_env.Tool('midl') 240 windows_env.Tool('midl')
233 windows_env.Replace( 241 windows_env.Replace(
234 BUILD_TYPE = 'debug-windows', 242 BUILD_TYPE = 'debug-windows',
235 BUILD_TYPE_DESCRIPTION = 'Windows debug build', 243 BUILD_TYPE_DESCRIPTION = 'Windows debug build',
236 BUILD_GROUPS = ['default'],
237 ) 244 )
245 windows_env.Append(BUILD_GROUPS = ['default'])
238 246
239 # TODO(bradnelson): this is needed for now because target_platform_windows 247 # TODO(bradnelson): this is needed for now because target_platform_windows
240 # has OS_WINDOWS defined in a weird way. 248 # has OS_WINDOWS defined in a weird way.
241 windows_env.FilterOut(CPPDEFINES = ['OS_WINDOWS=OS_WINDOWS']) 249 windows_env.FilterOut(CPPDEFINES = ['OS_WINDOWS=OS_WINDOWS'])
242 250
243 windows_env['PDB'] = '${TARGET.base}.pdb' 251 windows_env['PDB'] = '${TARGET.base}.pdb'
244 252
245 253
246 # TODO(bradnelson): this should not need to be gated on host platform. 254 # TODO(bradnelson): this should not need to be gated on host platform.
247 if root_env['PLATFORM'] in ['win32', 'cygwin']: 255 if root_env['PLATFORM'] in ['win32', 'cygwin']:
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 # Linux specific 402 # Linux specific
395 403
396 linux_env = root_env.Clone() 404 linux_env = root_env.Clone()
397 environment_list.append(linux_env) 405 environment_list.append(linux_env)
398 linux_env.Tool('target_platform_linux') 406 linux_env.Tool('target_platform_linux')
399 linux_env.Tool('target_debug') 407 linux_env.Tool('target_debug')
400 linux_env.Tool('yacc') 408 linux_env.Tool('yacc')
401 linux_env.Replace( 409 linux_env.Replace(
402 BUILD_TYPE = 'debug-linux', 410 BUILD_TYPE = 'debug-linux',
403 BUILD_TYPE_DESCRIPTION = 'Linux debug build', 411 BUILD_TYPE_DESCRIPTION = 'Linux debug build',
404 BUILD_GROUPS = ['default'],
405 ) 412 )
413 linux_env.Append(BUILD_GROUPS = ['default'])
406 414
407 415
408 # TODO(bradnelson): this is needed for now because target_platform_linux has 416 # TODO(bradnelson): this is needed for now because target_platform_linux has
409 # OS_LINUX defined in a weird way. 417 # OS_LINUX defined in a weird way.
410 linux_env.FilterOut(CPPDEFINES = ['OS_LINUX=OS_LINUX']) 418 linux_env.FilterOut(CPPDEFINES = ['OS_LINUX=OS_LINUX'])
411 419
412 # Copy some environment variables from the outer environment to the 420 # Copy some environment variables from the outer environment to the
413 # SCons.Environment if they exist. 421 # SCons.Environment if they exist.
414 for envvar in ('CC', 'CXX'): 422 for envvar in ('CC', 'CXX'):
415 if envvar in os.environ: 423 if envvar in os.environ:
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 # -------------------------------------------------------------------------- 504 # --------------------------------------------------------------------------
497 # Mac specific 505 # Mac specific
498 506
499 mac_env = root_env.Clone() 507 mac_env = root_env.Clone()
500 environment_list.append(mac_env) 508 environment_list.append(mac_env)
501 mac_env.Tool('target_platform_mac') 509 mac_env.Tool('target_platform_mac')
502 mac_env.Tool('target_debug') 510 mac_env.Tool('target_debug')
503 mac_env.Replace( 511 mac_env.Replace(
504 BUILD_TYPE = 'debug-mac', 512 BUILD_TYPE = 'debug-mac',
505 BUILD_TYPE_DESCRIPTION = 'Mac debug build', 513 BUILD_TYPE_DESCRIPTION = 'Mac debug build',
506 BUILD_GROUPS = ['default'],
507 ) 514 )
515 mac_env.Append(BUILD_GROUPS = ['default'])
508 516
509 mac_env.Replace( 517 mac_env.Replace(
510 # Reproduce XCode's behavior of using gcc even to link C++, 518 # Reproduce XCode's behavior of using gcc even to link C++,
511 # and distinguishing it the -x c++ option. 519 # and distinguishing it the -x c++ option.
512 CC = 'gcc-4.2', 520 CC = 'gcc-4.2',
513 CXX = 'g++-4.2', 521 CXX = 'g++-4.2',
514 LINK = '$CXX', 522 LINK = '$CXX',
515 ) 523 )
516 524
517 mac_env.FilterOut( 525 mac_env.FilterOut(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 Import('build_component') 641 Import('build_component')
634 Default(Alias(build_component)) 642 Default(Alias(build_component))
635 643
636 # ------------------------------------------------------------------------- 644 # -------------------------------------------------------------------------
637 645
638 # Invoke all the SConscripts in each of the environments that make sense on 646 # Invoke all the SConscripts in each of the environments that make sense on
639 # this host-platform. 647 # this host-platform.
640 BuildComponents(environment_list) 648 BuildComponents(environment_list)
641 649
642 # ------------------------------------------------------------------------- 650 # -------------------------------------------------------------------------
651
652 # This must occur after BuildComponents so that the dependency graph
653 # will be populated.
654 if root_env.Bit('solution'):
655 solution_env = root_env.Clone(tools = ['visual_studio_solution'])
656 solution = solution_env.Solution(
657 '$MAIN_DIR/chrome_scons', [windows_env],
658 exclude_pattern = '.*(Program Files|platformsdk_vista_6_0|cygwin).*',
659 )
660 Default(None) # Delete all other default targets.
661 Default(solution) # Build just the solution.
662
663 # -------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « no previous file | build/SConscript.v8 » ('j') | site_scons/site_tools/visual_studio_solution.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698