summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-26 00:15:50 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-26 00:15:50 +0000
commit4ebb4f136e3e5040351b4e29ca79fe1153ce606d (patch)
treedec0297e2f41b55c7a93ab586f0f60f9ca6f1d60 /build
parentd3af5134167cbdad1d2a647cd2a0ffe428a7cb8e (diff)
downloadchromium_src-4ebb4f136e3e5040351b4e29ca79fe1153ce606d.zip
chromium_src-4ebb4f136e3e5040351b4e29ca79fe1153ce606d.tar.gz
chromium_src-4ebb4f136e3e5040351b4e29ca79fe1153ce606d.tar.bz2
Refactor OS-dependent filename exclusion patterns
Rather than duplicate logic in the tree, merge all of the shared rules about patterns in filenames into one common set. The pattern is: "if (OS != x): exclude x's files." This is especially needed for upcoming changes that bring in a few more platform-specific (FreeBSD, OpenBSD, Solaris(?)) files. Review URL: http://codereview.chromium.org/443011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi34
1 files changed, 33 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi
index e6906fc..41dd4a4 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -908,7 +908,7 @@
},
}],
['chromium_code==0', {
- # This section must follow the other conditon sections above because
+ # This section must follow the other condition sections above because
# external_code.gypi expects to be merged into those settings.
'includes': [
'external_code.gypi',
@@ -920,6 +920,38 @@
'defines': [
'__STDC_FORMAT_MACROS',
],
+ 'conditions': [
+ ['OS!="win"', {
+ 'sources/': [ ['exclude', '_win\\.cc$'],
+ ['exclude', '/win/'],
+ ['exclude', '/win_[^/]*\\.cc$'] ],
+ }],
+ ['OS!="mac"', {
+ 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.cc$'],
+ ['exclude', '\.mm$' ] ],
+ }],
+ ['OS!="linux"', {
+ 'sources/': [
+ ['exclude', '_(chromeos|gtk|linux|x|x11)(_unittest)?\\.cc$'],
+ ['exclude', '/gtk/'],
+ ['exclude', '/(gtk|x11)_[^/]*\\.cc$'] ],
+ }],
+ # We use "POSIX" to refer to all non-Windows operating systems.
+ ['OS=="win"', {
+ 'sources/': [ ['exclude', '_posix\\.cc$'] ],
+ }],
+ # Though Skia is conceptually shared by Linux and Windows,
+ # the only _skia files in our tree are Linux-specific.
+ ['OS!="linux"', {
+ 'sources/': [ ['exclude', '_skia\\.cc$'] ],
+ }],
+ ['chromeos!=1', {
+ 'sources/': [ ['exclude', '_chromeos\\.cc$'] ]
+ }],
+ ['OS!="win" and toolkit_views!=1', {
+ 'sources/': [ ['exclude', '_views\\.cc$'] ]
+ }],
+ ],
},
}],
['disable_nacl==1', {