summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 18:26:00 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 18:26:00 +0000
commit6718b41077d178a58efa41707bf82f89478923ee (patch)
tree484f7fe04710a30c8fe2f988c47222ab39e8b709 /net
parent3c57ca05f196e998f2440e49cc5bf44969b12c37 (diff)
downloadchromium_src-6718b41077d178a58efa41707bf82f89478923ee.zip
chromium_src-6718b41077d178a58efa41707bf82f89478923ee.tar.gz
chromium_src-6718b41077d178a58efa41707bf82f89478923ee.tar.bz2
net.gyp changes for the Linux build (and some Windows fixing):
* Add a net_test_support library to hold the disk_cache_test_util.* object file used by several of the test executables. * Generate the net_resources.h file by re-using the existing net_resources 'grit' rule defined for Windows, not by rolling our own flavor. * Give the grit.py rule all of its generated output files (*.h, *.rc, *.pak). * Fix the path of the grit-generated *.h file (it's in a grit/ subdir). Review URL: http://codereview.chromium.org/40083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10898 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/net.gyp66
1 files changed, 23 insertions, 43 deletions
diff --git a/net/net.gyp b/net/net.gyp
index aa94f42..ca42c26 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -360,6 +360,7 @@
'type': 'executable',
'dependencies': [
'net',
+ 'net_test_support',
'../base/base.gyp:base',
'../testing/gtest.gyp:gtest',
],
@@ -397,8 +398,6 @@
'disk_cache/block_files_unittest.cc',
'disk_cache/disk_cache_test_base.cc',
'disk_cache/disk_cache_test_base.h',
- 'disk_cache/disk_cache_test_util.cc',
- 'disk_cache/disk_cache_test_util.h',
'disk_cache/entry_unittest.cc',
'disk_cache/mapped_file_unittest.cc',
'disk_cache/storage_block_unittest.cc',
@@ -460,6 +459,7 @@
'type': 'executable',
'dependencies': [
'net',
+ 'net_test_support',
'../base/base.gyp:base',
'../testing/gtest.gyp:gtest',
],
@@ -468,7 +468,6 @@
'../base/run_all_perftests.cc',
'base/cookie_monster_perftest.cc',
'disk_cache/disk_cache_perftest.cc',
- 'disk_cache/disk_cache_test_util.cc',
],
'conditions': [
# This is needed to trigger the dll copy step on windows.
@@ -486,10 +485,10 @@
'type': 'executable',
'dependencies': [
'net',
+ 'net_test_support',
'../base/base.gyp:base',
],
'sources': [
- 'disk_cache/disk_cache_test_util.cc',
'disk_cache/stress_cache.cc',
],
},
@@ -509,16 +508,28 @@
'type': 'executable',
'dependencies': [
'net',
+ 'net_test_support',
'../base/base.gyp:base',
],
'sources': [
'tools/crash_cache/crash_cache.cc',
+ ],
+ },
+ {
+ 'target_name': 'net_test_support',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'net',
+ '../base/base.gyp:base',
+ ],
+ 'sources': [
'disk_cache/disk_cache_test_util.cc',
+ 'disk_cache/disk_cache_test_util.h',
],
},
],
'conditions': [
- ['OS=="win"', {
+ ['OS!="mac"', {
'targets': [
{
'target_name': 'net_resources',
@@ -537,7 +548,9 @@
'<(DEPTH)/tools/grit/grit.py',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/<(RULE_INPUT_ROOT).h',
+ '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/grit/<(RULE_INPUT_ROOT).h',
+ '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/<(RULE_INPUT_ROOT).rc',
+ '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/<(RULE_INPUT_ROOT).pak',
],
'action':
['python', '<(DEPTH)/tools/grit/grit.py', '-i', '<(RULE_INPUT_PATH)', 'build', '-o', '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources'],
@@ -549,6 +562,10 @@
],
},
},
+ ],
+ }],
+ ['OS=="win"', {
+ 'targets': [
{
# TODO(port): dump_cache is still Windows-specific.
'target_name': 'dump_cache',
@@ -565,42 +582,5 @@
},
],
}],
- ['OS=="linux"', {
- 'targets': [
- {
- 'target_name': 'net_resources',
- 'type': 'resource',
- 'sources': [
- 'base/net_resources.grd',
- '../../grit_derived_sources/effective_tld_names_clean.dat',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../../grit_derived_sources'
- # FIXME: Should use one of the INTERMEDIATE dirs, e.g.:
- # '$(obj)/gen'
- ],
- },
- 'actions': [
- {
- 'action_name': 'net_resources_h',
- 'inputs': [
- 'tld_cleanup',
- 'base/effective_tld_names.dat',
- ],
- 'outputs': [
- '../../grit_derived_sources/effective_tld_names_clean.dat',
- ],
- # An 'action' like this would expand things at gyp time:
- #'action': 'tld_cleanup <@(_inputs) <@(_outputs)',
- # But that doesn't work well with the SCons variant dir
- # stuff that builds everything underneath Hammer. Just
- # put a SCons string in the action, at least for now.
- 'action': ['${SOURCES[0]}', '${SOURCES[1]}', '$TARGET'],
- }
- ],
- },
- ],
- }],
],
}