filename_rules.gypi 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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" or >(nacl_untrusted_build)==1', {
  10. 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
  11. ['exclude', '(^|/)win/'],
  12. ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
  13. }],
  14. ['OS!="mac" or >(nacl_untrusted_build)==1', {
  15. 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'],
  16. ['exclude', '(^|/)(cocoa|mac)/'] ],
  17. }],
  18. ['OS!="ios" or >(nacl_untrusted_build)==1', {
  19. 'sources/': [ ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
  20. ['exclude', '(^|/)ios/'] ],
  21. }],
  22. ['(OS!="mac" and OS!="ios") or >(nacl_untrusted_build)==1', {
  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!="solaris" and <(os_bsd)!=1 or >(nacl_untrusted_build)==1', {
  31. 'sources/': [
  32. ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
  33. ['exclude', '(^|/)linux/'],
  34. ],
  35. }],
  36. ['OS!="android"', {
  37. 'sources/': [
  38. ['exclude', '_android(_unittest)?\\.cc$'],
  39. ['exclude', '(^|/)android/'],
  40. ],
  41. }],
  42. ['OS=="win" and >(nacl_untrusted_build)==0', {
  43. 'sources/': [
  44. ['exclude', '_posix(_unittest)?\\.(h|cc)$'],
  45. ['exclude', '(^|/)posix/'],
  46. ],
  47. }],
  48. ['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
  49. 'sources/': [ ['exclude', '_chromeos(_unittest)?\\.(h|cc)$'] ]
  50. }],
  51. ['>(nacl_untrusted_build)==0', {
  52. 'sources/': [
  53. ['exclude', '_nacl(_unittest)?\\.(h|cc)$'],
  54. ],
  55. }],
  56. ['OS!="linux" and OS!="solaris" and <(os_bsd)!=1 or >(nacl_untrusted_build)==1', {
  57. 'sources/': [
  58. ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
  59. ],
  60. }],
  61. ['<(use_x11)!=1 or >(nacl_untrusted_build)==1', {
  62. 'sources/': [
  63. ['exclude', '_(x|x11)(_unittest)?\\.(h|cc)$'],
  64. ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
  65. ],
  66. }],
  67. ['(<(toolkit_uses_gtk)!=1 or >(nacl_untrusted_build)==1) and (build_with_mozilla==0)', {
  68. 'sources/': [
  69. ['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
  70. ['exclude', '(^|/)gtk/'],
  71. ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
  72. ],
  73. }],
  74. ['<(toolkit_views)==0 or >(nacl_untrusted_build)==1', {
  75. 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
  76. }],
  77. ['<(use_aura)==0 or >(nacl_untrusted_build)==1', {
  78. 'sources/': [ ['exclude', '_aura(_unittest)?\\.(h|cc)$'],
  79. ['exclude', '(^|/)aura/'],
  80. ]
  81. }],
  82. ['<(use_aura)==0 or <(use_x11)==0 or >(nacl_untrusted_build)==1', {
  83. 'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ]
  84. }],
  85. ['<(use_aura)==0 or OS!="win" or >(nacl_untrusted_build)==1', {
  86. 'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ]
  87. }],
  88. ['<(use_ash)==0 or >(nacl_untrusted_build)==1', {
  89. 'sources/': [ ['exclude', '_ash(_unittest)?\\.(h|cc)$'],
  90. ['exclude', '(^|/)ash/'],
  91. ]
  92. }],
  93. ]
  94. }