test.gyp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Copyright (c) 2014 Google Inc. 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. # These gyp files create the following dependencies:
  5. #
  6. # test.gyp:
  7. # #exe -> subdir/subdir.gyp#foo, subdir/subdir2/subdir2.gyp#subdir2
  8. # foo.c
  9. # subdir/subdir_source2.c
  10. # conditional_source.c (if test_variable==1)
  11. # action_input.c
  12. # action_output.c
  13. # rule_input.c
  14. # rule_output.pdf
  15. # #exe2
  16. # exe2.c
  17. # #exe3 -> subdir/subdir.gyp#foo, subdir/subdir.gyp#subdir2a
  18. # exe3.c
  19. # #all (type none) -> exe, exe3
  20. #
  21. # subdir/subdir.gyp
  22. # #foo
  23. # subdir/subdir_source.c
  24. # parent_source.c
  25. # #subdir2a -> subdir2b
  26. # subdir/subdir2_source.c
  27. # #subdir2b
  28. # subdir/subdir2b_source.c
  29. #
  30. # subdir/subdir2/subdir2.gyp
  31. # #subdir2
  32. # subdir/subdir_source.h
  33. {
  34. 'variables': {
  35. 'test_variable%': 0,
  36. 'variable_path': 'subdir',
  37. },
  38. 'targets': [
  39. {
  40. 'target_name': 'exe',
  41. 'type': 'executable',
  42. 'dependencies': [
  43. 'subdir/subdir.gyp:foo',
  44. 'subdir/subdir2/subdir2.gyp:subdir2',
  45. ],
  46. 'sources': [
  47. 'foo.c',
  48. '<(variable_path)/subdir_source2.c',
  49. ],
  50. 'conditions': [
  51. ['test_variable==1', {
  52. 'sources': [
  53. 'conditional_source.c',
  54. ],
  55. }],
  56. ],
  57. 'actions': [
  58. {
  59. 'action_name': 'action',
  60. 'inputs': [
  61. '<(PRODUCT_DIR)/product_dir_input.c',
  62. 'action_input.c',
  63. '../bad_path1.h',
  64. '../../bad_path2.h',
  65. ],
  66. 'outputs': [
  67. 'action_output.c',
  68. ],
  69. },
  70. ],
  71. 'rules': [
  72. {
  73. 'rule_name': 'rule',
  74. 'extension': 'pdf',
  75. 'inputs': [
  76. 'rule_input.c',
  77. ],
  78. 'outputs': [
  79. 'rule_output.pdf',
  80. ],
  81. },
  82. ],
  83. },
  84. {
  85. 'target_name': 'exe2',
  86. 'type': 'executable',
  87. 'sources': [
  88. 'exe2.c',
  89. ],
  90. },
  91. {
  92. 'target_name': 'exe3',
  93. 'type': 'executable',
  94. 'dependencies': [
  95. 'subdir/subdir.gyp:foo',
  96. 'subdir/subdir.gyp:subdir2a',
  97. ],
  98. 'sources': [
  99. 'exe3.c',
  100. ],
  101. },
  102. {
  103. 'target_name': 'all',
  104. 'type': 'none',
  105. 'dependencies': [
  106. 'exe',
  107. 'exe3',
  108. ],
  109. },
  110. ],
  111. }