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

Side by Side Diff: chrome/SConscript

Issue 7847: Using $CHROME_SRC_DIR in place of hash/..... (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/googleurl_unittests.scons ('k') | chrome/SConscript.automated_ui_tests » ('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 6
7 Import(['env']) 7 Import(['env'])
8 8
9 env_res = env.Clone() 9 env_res = env.Clone()
10 env_test = env.Clone() 10 env_test = env.Clone()
(...skipping 12 matching lines...) Expand all
23 23
24 24
25 # TODO(port) 25 # TODO(port)
26 if env_res['PLATFORM'] == 'win32': 26 if env_res['PLATFORM'] == 'win32':
27 env_res.Append( 27 env_res.Append(
28 CPPDEFINES = [ 28 CPPDEFINES = [
29 'GOOGLE_CHROME_BUILD', 29 'GOOGLE_CHROME_BUILD',
30 ], 30 ],
31 CPPPATH = [ 31 CPPPATH = [
32 '.', 32 '.',
33 '#/..', 33 '$CHROME_SRC_DIR',
34 # For app/chrome_dll.res to #include installer_util_strings.rc. 34 # For app/chrome_dll.res to #include installer_util_strings.rc.
35 '$CHROME_DIR/installer/util', 35 '$CHROME_DIR/installer/util',
36 ], 36 ],
37 RCFLAGS = [ 37 RCFLAGS = [
38 ['/l', '0x409'], 38 ['/l', '0x409'],
39 ], 39 ],
40 ) 40 )
41 41
42 browser_res = env_res.RES('browser/browser_resources.rc') 42 browser_res = env_res.RES('browser/browser_resources.rc')
43 chrome_dll_res = env_res.RES('app/chrome_dll.rc') 43 chrome_dll_res = env_res.RES('app/chrome_dll.rc')
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 'chrome_dll.pdb', 206 'chrome_dll.pdb',
207 'chrome_dll.lib', 207 'chrome_dll.lib',
208 ] 208 ]
209 else: 209 else:
210 targets = ['chrome'] 210 targets = ['chrome']
211 211
212 212
213 213
214 # TODO(sgk): make a pseudo-Builder for these 214 # TODO(sgk): make a pseudo-Builder for these
215 import sys 215 import sys
216 sys.path.append(Dir('#/../tools/grit').abspath) 216 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath)
217 217
218 env_grd = env.Clone() 218 env_grd = env.Clone()
219 env_grd.Tool('scons', toolpath=['#/../tools/grit/grit']) 219 env_grd.Tool('scons', toolpath=[env_grd.Dir('$CHROME_SRC_DIR/tools/grit/grit')])
220 220
221 # NOTE: fake target gets replaced with real targets from reading .grd 221 # NOTE: fake target gets replaced with real targets from reading .grd
222 generated = env_grd.GRIT('app/resources/fake_generated_target', 222 generated = env_grd.GRIT('app/resources/fake_generated_target',
223 '#/../chrome/app/generated_resources.grd') 223 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd')
224 grit_files.extend(generated) 224 grit_files.extend(generated)
225 225
226 # NOTE: fake target gets replaced with real targets from reading .grd 226 # NOTE: fake target gets replaced with real targets from reading .grd
227 chromium = env_grd.GRIT('app/resources/fake_chromium_target', 227 chromium = env_grd.GRIT('app/resources/fake_chromium_target',
228 '#/../chrome/app/chromium_strings.grd') 228 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd')
229 grit_files.extend(chromium) 229 grit_files.extend(chromium)
230 230
231 # NOTE: fake target gets replaced with real targets from reading .grd 231 # NOTE: fake target gets replaced with real targets from reading .grd
232 google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target', 232 google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target',
233 '#/../chrome/app/google_chrome_strings.grd') 233 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd')
234 grit_files.extend(google_chrome) 234 grit_files.extend(google_chrome)
235 235
236 236
237 237
238 # TODO(port) 238 # TODO(port)
239 if env_dll['PLATFORM'] == 'win32': 239 if env_dll['PLATFORM'] == 'win32':
240 dll_targets = env_dll.ChromeSharedLibrary(targets, 240 dll_targets = env_dll.ChromeSharedLibrary(targets,
241 dll_resources + input_files + libs) 241 dll_resources + input_files + libs)
242 install_targets.extend(dll_targets) 242 install_targets.extend(dll_targets)
243 243
244 for g in [ g for g in grit_files if str(g).endswith('.rc') ]: 244 for g in [ g for g in grit_files if str(g).endswith('.rc') ]:
245 env_res.RES(g) 245 env_res.RES(g)
246 246
247 def chrome_version_emitter(target, source, env): 247 def chrome_version_emitter(target, source, env):
248 source.append('$CHROME_SRC_DIR/VERSION') 248 source.append('$CHROME_SRC_DIR/VERSION')
249 # TODO(sgk): parameterize for chromium-vs.-google_chrome 249 # TODO(sgk): parameterize for chromium-vs.-google_chrome
250 source.append('$CHROME_SRC_DIR/app/theme/google_chrome/BRANDING') 250 source.append('$CHROME_SRC_DIR/app/theme/google_chrome/BRANDING')
251 return target, source 251 return target, source
252 252
253 b = Builder(action = '$CHROME_VERSION_RC_COM', 253 b = Builder(action = '$CHROME_VERSION_RC_COM',
254 emitter = chrome_version_emitter) 254 emitter = chrome_version_emitter)
255 255
256 env['BUILDERS']['ChromeVersionRC'] = b 256 env['BUILDERS']['ChromeVersionRC'] = b
257 257
258 env.Replace( 258 env.Replace(
259 CHROME_VERSION_RC_COM = 259 CHROME_VERSION_RC_COM =
260 '$VERSION_BAT $SOURCE $CHROME_SRC_DIR $PWD $TARGET', 260 '$VERSION_BAT $SOURCE $CHROME_SRC_DIR $PWD $TARGET',
261 VERSION_BAT = File('#/../chrome/tools/build/win/version.bat'), 261 VERSION_BAT = env.File(
262 CHROME_SRC_DIR = Dir('#/../chrome'), 262 '$CHROME_SRC_DIR/chrome/tools/build/win/version.bat'),
263 CHROME_SRC_DIR = env.Dir('$CHROME_SRC_DIR/chrome'),
263 PWD = Dir('.'), 264 PWD = Dir('.'),
264 ) 265 )
265 266
266 chrome_exe_version_rc = env.ChromeVersionRC( 267 chrome_exe_version_rc = env.ChromeVersionRC(
267 'chrome_exe_version.rc', 268 'chrome_exe_version.rc',
268 'app/chrome_exe_version.rc.version' 269 'app/chrome_exe_version.rc.version'
269 ) 270 )
270 271
271 chrome_dll_version_rc = env.ChromeVersionRC( 272 chrome_dll_version_rc = env.ChromeVersionRC(
272 'chrome_dll_version.rc', 273 'chrome_dll_version.rc',
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 Copy('$TARGET', '$SOURCE')) 359 Copy('$TARGET', '$SOURCE'))
359 360
360 # For release we want to run dependencies.py, may look something like: 361 # For release we want to run dependencies.py, may look something like:
361 #env.AddPostAction('$TARGET_ROOT/chrome.exe', 362 #env.AddPostAction('$TARGET_ROOT/chrome.exe',
362 # '$PYTHON tools/build/win/dependencies.py $(TargetPath) chro me.exe.deps') 363 # '$PYTHON tools/build/win/dependencies.py $(TargetPath) chro me.exe.deps')
363 364
364 365
365 366
366 env_flat = env.Clone( 367 env_flat = env.Clone(
367 BROWSER_RESOURCES = Dir('browser_resources'), 368 BROWSER_RESOURCES = Dir('browser_resources'),
368 HTML_INLINE = File('#/../chrome/tools/build/win/html_inline.py'), 369 HTML_INLINE = env.File(
370 '$CHROME_SRC_DIR/chrome/tools/build/win/html_inline.py'),
369 FLATTEN_HTML_COM = '$PYTHON $HTML_INLINE $SOURCE $TARGET', 371 FLATTEN_HTML_COM = '$PYTHON $HTML_INLINE $SOURCE $TARGET',
370 ) 372 )
371 373
372 def FlatHtmlEmitter(target, source, env): 374 def FlatHtmlEmitter(target, source, env):
373 # When we get the target, it will have the "_flat.html" suffix, 375 # When we get the target, it will have the "_flat.html" suffix,
374 # but will be next to the sourcefile. Replace it with a 376 # but will be next to the sourcefile. Replace it with a
375 # string that puts it in the $BROWSER_RESOURCES directory. 377 # string that puts it in the $BROWSER_RESOURCES directory.
376 target = [env.File('$BROWSER_RESOURCES/' + target[0].name)] 378 target = [env.File('$BROWSER_RESOURCES/' + target[0].name)]
377 return target, source 379 return target, source
378 380
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 '$GEARS_DIR/binaries/gears.pdb', 476 '$GEARS_DIR/binaries/gears.pdb',
475 ] 477 ]
476 478
477 # TODO(port) 479 # TODO(port)
478 if env['PLATFORM'] == 'win32': 480 if env['PLATFORM'] == 'win32':
479 i = env.Install('$TARGET_ROOT/plugins/gears', gears_plugins) 481 i = env.Install('$TARGET_ROOT/plugins/gears', gears_plugins)
480 env.Alias('chrome', i) 482 env.Alias('chrome', i)
481 483
482 484
483 i = env.Command('$TARGET_ROOT/resources/inspector', 485 i = env.Command('$TARGET_ROOT/resources/inspector',
484 '#/../webkit/port/page/inspector', 486 '$CHROME_SRC_DIR/webkit/port/page/inspector',
485 Copy('$TARGET', '$SOURCE'), 487 Copy('$TARGET', '$SOURCE'),
486 source_scanner=DirScanner) 488 source_scanner=DirScanner)
487 env.Alias('chrome', i) 489 env.Alias('chrome', i)
488 490
489 env.Alias('chrome', env.Alias('webkit')) 491 env.Alias('chrome', env.Alias('webkit'))
OLDNEW
« no previous file with comments | « build/googleurl_unittests.scons ('k') | chrome/SConscript.automated_ui_tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698