summaryrefslogtreecommitdiffstats
path: root/build/filename_rules.gypi
blob: 162e9b2b16619307d54cd3facddfe02dfafd2326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This gypi file defines the patterns used for determining whether a
# file is excluded from the build on a given platform.  It is
# included by common.gypi for chromium_code.

{
  'conditions': [
    ['OS!="win"', {
      'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
                    ['exclude', '(^|/)win/'],
                    ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
    }],
    ['OS!="mac"', {
      'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
                    ['exclude', '(^|/)(cocoa|mac)/'],
                    ['exclude', '\\.mm?$' ] ],
    }],
    # Do not exclude the linux files on *BSD since most of them can be
    # shared at this point.
    # In case a file is not needed, it is going to be excluded later on.
    # TODO(evan): the above is not correct; we shouldn't build _linux
    # files on non-linux.
    ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
      'sources/': [
        ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
        ['exclude', '(^|/)linux/'],
      ],
    }],
    ['OS!="android" and OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
      'sources/': [
        ['exclude', '_linuxish(_unittest)?\\.(h|cc)$'],
        ['exclude', '(^|/)linuxish/'],
      ],
    }],
    ['OS!="android"', {
      'sources/': [
        ['exclude', '_android(_unittest)?\\.cc$'],
        ['exclude', '(^|/)android/'],
      ],
    }],
    ['OS=="win"', {
       'sources/': [ ['exclude', '_posix(_unittest)?\\.(h|cc)$'] ],
    }],
    ['chromeos!=1', {
      'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
    }],
    ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
      'sources/': [
        ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
      ],
    }],


    ['use_x11!=1', {
      'sources/': [
        ['exclude', '_(chromeos|x|x11)(_unittest)?\\.(h|cc)$'],
        ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
      ],
    }],
    ['toolkit_uses_gtk!=1', {
      'sources/': [
        ['exclude', '_gtk(_unittest)?\\.(h|cc)$'],
        ['exclude', '(^|/)gtk/'],
        ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
      ],
    }],
    ['toolkit_views==0', {
      'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
    }],
    ['use_aura==0', {
      'sources/': [ ['exclude', '_aura(_unittest)?\\.(h|cc)$'],
                    ['exclude', '(^|/)aura/'],
      ]
    }],
    ['use_aura==0 or use_x11==0', {
      'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ]
    }],
    ['use_aura==0 or OS!="win"', {
      'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ]
    }],
    ['use_ash==0', {
      'sources/': [ ['exclude', '_ash(_unittest)?\\.(h|cc)$'],
                    ['exclude', '(^|/)ash/'],
      ]
    }],
  ]
}