summaryrefslogtreecommitdiffstats
path: root/net/net_resources.scons
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-08 21:58:04 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-08 21:58:04 +0000
commit85aed525ca4109b6d3f9fe82d0b82c3a6d2cf722 (patch)
tree78f12ef87462b62f1fd11a7116d1a771b9ca2e90 /net/net_resources.scons
parentb11c6a558fe2e45617ed715fb98ed7d1ea2e9126 (diff)
downloadchromium_src-85aed525ca4109b6d3f9fe82d0b82c3a6d2cf722.zip
chromium_src-85aed525ca4109b6d3f9fe82d0b82c3a6d2cf722.tar.gz
chromium_src-85aed525ca4109b6d3f9fe82d0b82c3a6d2cf722.tar.bz2
Remove net_resources.rc and net_resources.h and replace it
with a grd file that generates the same thing. We want to do this so on linux, we will have grit generate the .h file and a platform specific resource file. There's some munging going on to be able to get the effective_tld_names_clean.dat file included in the rc. This works in visual studio and scons. I need to update chrome_kjs.sln and the webkit*.sln files and the mac build before committing. Review URL: http://codereview.chromium.org/16565 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/net_resources.scons')
-rw-r--r--net/net_resources.scons44
1 files changed, 25 insertions, 19 deletions
diff --git a/net/net_resources.scons b/net/net_resources.scons
index c7dfc31..c76ed62 100644
--- a/net/net_resources.scons
+++ b/net/net_resources.scons
@@ -6,33 +6,39 @@ __doc__ = """
Configuration for building the net_resources.rc resources.
"""
+import os
+import sys
+
Import('env')
env = env.Clone()
-env.Prepend(
- RCFLAGS = [
- ['/l', '0x409'],
- ],
-)
-
input_files = [
'base/effective_tld_names.dat',
- 'tools/tld_cleanup/tld_cleanup.exe'
+ 'tools/tld_cleanup/tld_cleanup$PROGSUFFIX',
]
+sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath)
+env.Tool('scons', toolpath=[env.Dir('$CHROME_SRC_DIR/tools/grit/grit')])
+# This dummy target is used to tell the emitter where to put the target files.
+generated = env.GRIT('$TARGET_ROOT/grit_derived_sources/dummy_net_res',
+ 'base/net_resources.grd')
+
if env.Bit('windows'):
+ env.Prepend(
+ RCFLAGS = [
+ '/l 0x409',
+ ],
+ )
+
# TODO(port): Need to figure out what to do with external resources
# on linux (and mac?).
- # This dat file needed by net_resources is generated.
- tld_names_clean = env.Command('net/effective_tld_names_clean.dat',
- input_files,
- '${SOURCES[1]} ${SOURCES[0]} $TARGET')
-
- rc = env.Command('net_resources.rc',
- 'base/net_resources.rc',
- Copy('$TARGET', '$SOURCE'))
-
- env.Depends(rc, tld_names_clean)
-
- env.RES(rc)
+ # This dat file needed by net_resources.rc is generated.
+ tld_names_clean = env.Command(
+ '$TARGET_ROOT/grit_derived_sources/effective_tld_names_clean.dat',
+ input_files,
+ '${SOURCES[1]} ${SOURCES[0]} $TARGET')
+
+ for g in [g for g in generated if str(g).endswith('.rc')]:
+ net_res = env.RES(g)
+ env.Depends(net_res, tld_names_clean)