| 1 |
# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 |
# Use of this source code is governed by a BSD-style license that can be |
| 3 |
# found in the LICENSE file. |
| 4 |
|
| 5 |
# This gypi file defines the patterns used for determining whether a |
| 6 |
# file is excluded from the build on a given platform. It is |
| 7 |
# included by common.gypi for chromium_code. |
| 8 |
|
| 9 |
{ |
| 10 |
'target_conditions': [ |
| 11 |
['OS!="win" or >(nacl_untrusted_build)==1', { |
| 12 |
'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'], |
| 13 |
['exclude', '(^|/)win/'], |
| 14 |
['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ], |
| 15 |
}], |
| 16 |
['OS!="mac" or >(nacl_untrusted_build)==1', { |
| 17 |
'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'], |
| 18 |
['exclude', '(^|/)(cocoa|mac)/'] ], |
| 19 |
}], |
| 20 |
['OS!="ios" or >(nacl_untrusted_build)==1', { |
| 21 |
'sources/': [ ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'], |
| 22 |
['exclude', '(^|/)ios/'] ], |
| 23 |
}], |
| 24 |
['(OS!="mac" and OS!="ios") or >(nacl_untrusted_build)==1', { |
| 25 |
'sources/': [ ['exclude', '\\.mm?$' ] ], |
| 26 |
}], |
| 27 |
# Do not exclude the linux files on *BSD since most of them can be |
| 28 |
# shared at this point. |
| 29 |
# In case a file is not needed, it is going to be excluded later on. |
| 30 |
# TODO(evan): the above is not correct; we shouldn't build _linux |
| 31 |
# files on non-linux. |
| 32 |
['OS!="linux" and OS!="solaris" and <(os_bsd)!=1 or >(nacl_untrusted_build)==1', { |
| 33 |
'sources/': [ |
| 34 |
['exclude', '_linux(_unittest)?\\.(h|cc)$'], |
| 35 |
['exclude', '(^|/)linux/'], |
| 36 |
], |
| 37 |
}], |
| 38 |
['OS!="android"', { |
| 39 |
'sources/': [ |
| 40 |
['exclude', '_android(_unittest)?\\.cc$'], |
| 41 |
['exclude', '(^|/)android/'], |
| 42 |
], |
| 43 |
}], |
| 44 |
['OS=="win" and >(nacl_untrusted_build)==0', { |
| 45 |
'sources/': [ |
| 46 |
['exclude', '_posix(_unittest)?\\.(h|cc)$'], |
| 47 |
['exclude', '(^|/)posix/'], |
| 48 |
], |
| 49 |
}], |
| 50 |
['<(chromeos)!=1 or >(nacl_untrusted_build)==1', { |
| 51 |
'sources/': [ ['exclude', '_chromeos(_unittest)?\\.(h|cc)$'] ] |
| 52 |
}], |
| 53 |
['>(nacl_untrusted_build)==0', { |
| 54 |
'sources/': [ |
| 55 |
['exclude', '_nacl(_unittest)?\\.(h|cc)$'], |
| 56 |
], |
| 57 |
}], |
| 58 |
['OS!="linux" and OS!="solaris" and <(os_bsd)!=1 or >(nacl_untrusted_build)==1', { |
| 59 |
'sources/': [ |
| 60 |
['exclude', '_xdg(_unittest)?\\.(h|cc)$'], |
| 61 |
], |
| 62 |
}], |
| 63 |
['<(use_x11)!=1 or >(nacl_untrusted_build)==1', { |
| 64 |
'sources/': [ |
| 65 |
['exclude', '_(x|x11)(_unittest)?\\.(h|cc)$'], |
| 66 |
['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'], |
| 67 |
], |
| 68 |
}], |
| 69 |
['(<(toolkit_uses_gtk)!=1 or >(nacl_untrusted_build)==1) and (build_with_mozilla==0)', { |
| 70 |
'sources/': [ |
| 71 |
['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'], |
| 72 |
['exclude', '(^|/)gtk/'], |
| 73 |
['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'], |
| 74 |
], |
| 75 |
}], |
| 76 |
['<(toolkit_views)==0 or >(nacl_untrusted_build)==1', { |
| 77 |
'sources/': [ ['exclude', '_views\\.(h|cc)$'] ] |
| 78 |
}], |
| 79 |
['<(use_aura)==0 or >(nacl_untrusted_build)==1', { |
| 80 |
'sources/': [ ['exclude', '_aura(_unittest)?\\.(h|cc)$'], |
| 81 |
['exclude', '(^|/)aura/'], |
| 82 |
] |
| 83 |
}], |
| 84 |
['<(use_aura)==0 or <(use_x11)==0 or >(nacl_untrusted_build)==1', { |
| 85 |
'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ] |
| 86 |
}], |
| 87 |
['<(use_aura)==0 or OS!="win" or >(nacl_untrusted_build)==1', { |
| 88 |
'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ] |
| 89 |
}], |
| 90 |
['<(use_ash)==0 or >(nacl_untrusted_build)==1', { |
| 91 |
'sources/': [ ['exclude', '_ash(_unittest)?\\.(h|cc)$'], |
| 92 |
['exclude', '(^|/)ash/'], |
| 93 |
] |
| 94 |
}], |
| 95 |
] |
| 96 |
} |