filename_rules.gypi 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. # This gypi file defines the patterns used for determining whether a
  5. # file is excluded from the build on a given platform. It is
  6. # included by common.gypi for chromium_code.
  7. {
  8. 'target_conditions': [
  9. ['OS!="win"', {
  10. 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
  11. ['exclude', '(^|/)win/'],
  12. ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
  13. }],
  14. ['OS!="mac"', {
  15. 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'],
  16. ['exclude', '(^|/)(cocoa|mac)/'] ],
  17. }],
  18. ['OS!="ios"', {
  19. 'sources/': [ ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
  20. ['exclude', '(^|/)ios/'] ],
  21. }],
  22. ['OS!="mac" and OS!="ios"', {
  23. 'sources/': [ ['exclude', '\\.mm?$' ] ],
  24. }],
  25. # Do not exclude the linux files on *BSD since most of them can be
  26. # shared at this point.
  27. # In case a file is not needed, it is going to be excluded later on.
  28. # TODO(evan): the above is not correct; we shouldn't build _linux
  29. # files on non-linux.
  30. ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
  31. 'sources/': [
  32. ['exclude', '(^|/)library_loaders/'],
  33. ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
  34. ['exclude', '(^|/)linux_[^/]*\\.(h|cc)$'],
  35. ['exclude', '(^|/)linux/'],
  36. ['exclude', '_x11(_unittest)?\\.(h|cc)$'],
  37. ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
  38. ['exclude', '(^|/)x11/'],
  39. ],
  40. }],
  41. ['OS!="android"', {
  42. 'sources/': [
  43. ['exclude', '_android(_unittest)?\\.cc$'],
  44. ['exclude', '(^|/)android/'],
  45. ],
  46. }],
  47. ['OS=="win"', {
  48. 'sources/': [
  49. ['exclude', '_posix(_unittest)?\\.(h|cc)$'],
  50. ['exclude', '(^|/)posix/'],
  51. ],
  52. }],
  53. ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
  54. 'sources/': [
  55. ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
  56. ],
  57. }],
  58. ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
  59. 'sources/': [
  60. ['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
  61. ['exclude', '(^|/)gtk/'],
  62. ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
  63. ['exclude', '(^|/)libgtkui/'],
  64. ['exclude', '(^|/)x/'],
  65. ],
  66. }],
  67. ['OS=="mac"', {
  68. 'sources/': [ ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'],
  69. ['exclude', '(^|/)aura/'],
  70. ['exclude', '_views\\.(h|cc)$'],
  71. ['exclude', '(^|/)views/'],
  72. ],
  73. }],
  74. ]
  75. }