summaryrefslogtreecommitdiff
path: root/other-licenses/gyp-deps/tools/gyp/test/analyzer/test.gyp
blob: c25ca73bff80ddfaf13e32f921f1832933dda771 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# These gyp files create the following dependencies:
#
# test.gyp:
#   #exe -> subdir/subdir.gyp#foo, subdir/subdir2/subdir2.gyp#subdir2
#     foo.c
#     subdir/subdir_source2.c
#     conditional_source.c (if test_variable==1)
#     action_input.c
#     action_output.c
#     rule_input.c
#     rule_output.pdf
#   #exe2
#     exe2.c
#   #exe3 -> subdir/subdir.gyp#foo, subdir/subdir.gyp#subdir2a
#     exe3.c
#   #allx (type none) -> exe, exe3
# 
# subdir/subdir.gyp
#   #foo
#     subdir/subdir_source.c
#     parent_source.c
#   #subdir2a -> subdir2b
#     subdir/subdir2_source.c
#   #subdir2b
#     subdir/subdir2b_source.c
# 
# subdir/subdir2/subdir2.gyp
#   #subdir2
#     subdir/subdir_source.h

{
  'variables': {
    'test_variable%': 0,
    'variable_path': 'subdir',
   },
  'targets': [
    {
      'target_name': 'exe',
      'type': 'executable',
      'dependencies': [
        'subdir/subdir.gyp:foo',
        'subdir/subdir2/subdir2.gyp:subdir2',
      ],
      'sources': [
        'foo.c',
        '<(variable_path)/subdir_source2.c',
      ],
      'conditions': [
        ['test_variable==1', {
          'sources': [
            'conditional_source.c',
          ],
        }],
      ],
      'actions': [
        {
          'action_name': 'action',
          'inputs': [
            '<(PRODUCT_DIR)/product_dir_input.c',
            'action_input.c',
            '../bad_path1.h',
            '../../bad_path2.h',
            './rel_path1.h',
          ],
          'outputs': [
            'action_output.c',
          ],
        },
      ],
      'rules': [
        {
          'rule_name': 'rule',
          'extension': 'pdf',
          'inputs': [
            'rule_input.c',
          ],
          'outputs': [
            'rule_output.pdf',
          ],
        },
      ],
    },
    {
      'target_name': 'exe2',
      'type': 'executable',
      'sources': [
        'exe2.c',
      ],
    },
    {
      'target_name': 'exe3',
      'type': 'executable',
      'dependencies': [
        'subdir/subdir.gyp:foo',
        'subdir/subdir.gyp:subdir2a',
      ],
      'sources': [
        'exe3.c',
      ],
    },
    {
      'target_name': 'allx',
      'type': 'none',
      'dependencies': [
        'exe',
        'exe3',
      ],
    },
  ],
}