summaryrefslogtreecommitdiffstats
path: root/chrome/SConscript
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-29 10:16:43 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-29 10:16:43 +0000
commit466c8a51142090c6b475d72acd380ce72a10bfe9 (patch)
treef17f961accbc0c1ce084fd03afe72cd65f129073 /chrome/SConscript
parentff845a4ee79af7b00dbe7de4b358cae0119b1585 (diff)
downloadchromium_src-466c8a51142090c6b475d72acd380ce72a10bfe9.zip
chromium_src-466c8a51142090c6b475d72acd380ce72a10bfe9.tar.gz
chromium_src-466c8a51142090c6b475d72acd380ce72a10bfe9.tar.bz2
SCons build: Generate the chromium_strings* and google_chrome_string*
resource and .h files from their .grd files. TBR: rahulk git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/SConscript')
-rw-r--r--chrome/SConscript23
1 files changed, 21 insertions, 2 deletions
diff --git a/chrome/SConscript b/chrome/SConscript
index 9b57018..70dfc45 100644
--- a/chrome/SConscript
+++ b/chrome/SConscript
@@ -47,6 +47,9 @@ env.Prepend(
env_res.Append(
+ CPPDEFINES = [
+ 'GOOGLE_CHROME_BUILD',
+ ],
CPPPATH = [
'.',
'#/..',
@@ -91,6 +94,7 @@ env_dll.Prepend(
'U_STATIC_IMPLEMENTATION',
'PNG_USER_CONFIG',
'CHROME_PNG_WRITE_SUPPORT',
+ 'GOOGLE_CHROME_BUILD',
'LIBXSLT_STATIC',
'LIBXML_STATIC',
'_WINDLL',
@@ -223,17 +227,32 @@ install_targets.extend(dll_targets)
+# TODO(sgk): make a pseudo-Builder for these
import os
import sys
sys.path.append(Dir('#/../tools/grit').abspath)
+
env_grd = env.Clone()
env_grd.Tool('scons', toolpath=['#/../tools/grit/grit'])
-# NOTE: generated_target is fake, to cause a different target.
-generated = env_grd.GRIT('app/resources/generated_target',
+
+# NOTE: fake target gets replaced with real targets from reading .grd
+generated = env_grd.GRIT('app/resources/fake_generated_target',
'#/../chrome/app/generated_resources.grd')
for g in [ g for g in generated if str(g).endswith('.rc') ]:
env_res.RES(g)
+# NOTE: fake target gets replaced with real targets from reading .grd
+chromium = env_grd.GRIT('app/resources/fake_chromium_target',
+ '#/../chrome/app/chromium_strings.grd')
+for g in [ g for g in chromium if str(g).endswith('.rc') ]:
+ env_res.RES(g)
+
+# NOTE: fake target gets replaced with real targets from reading .grd
+google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target',
+ '#/../chrome/app/google_chrome_strings.grd')
+for g in [ g for g in google_chrome if str(g).endswith('.rc') ]:
+ env_res.RES(g)
+
def chrome_version_emitter(target, source, env):