summaryrefslogtreecommitdiff
path: root/deps/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp
blob: e5e6f3ec2b19ec0161be21db13d4f7d124e2cd84 (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
# 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.

# Tests that if a rule input is also an action input, both the rule and action
# are executed
{
  'targets': [
    {
      'target_name': 'files_both_rule_and_action_input',
      'type': 'executable',
      'msvs_cygwin_shell': 0,
      'sources': [
        'program.c',
        'file1.in',
        'file2.in',
      ],
      'rules': [
        {
          'rule_name': 'copy_file',
          'extension': 'in',
          'inputs': [
            '../copy-file.py',
          ],
          'outputs': [
            '<(RULE_INPUT_ROOT).out4',
          ],
          'action': [
            'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
          ],
        },
      ],
      'actions': [
        {
          'action_name': 'copy_file1_in',
          'inputs': [
            '../copy-file.py',
            'file1.in',
          ],
          'outputs': [
            'file1.copy',
          ],
          'action': [
            'python', '<@(_inputs)', '<(_outputs)'
          ],
        },
      ],
    },
  ],
}