summaryrefslogtreecommitdiff
path: root/deps/gyp/test/rules-use-built-dependencies/src/use-built-dependencies-rule.gyp
blob: 92bfeda39288f1fcf4f6683e6f7c6a58a7f53c4a (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
# Copyright (c) 2013 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.

{
  'targets': [
    {
      'target_name': 'main',
      'toolsets': ['host'],
      'type': 'executable',
      'sources': [
        'main.cc',
      ],
    },
    {
      'target_name': 'post',
      'toolsets': ['host'],
      'type': 'none',
      'dependencies': [
        'main',
      ],
      'sources': [
        # As this test is written it could easily be made into an action.
        # An acutal use case would have a number of these 'sources'.
        '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)main<(EXECUTABLE_SUFFIX)',
      ],
      'rules': [
        {
          'rule_name': 'generate_output',
          'extension': '<(EXECUTABLE_SUFFIX)',
          'outputs': [ '<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)_output', ],
          'msvs_cygwin_shell': 0,
          'action': [
            '<(RULE_INPUT_PATH)',
            '<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)_output',
          ],
          'message': 'Generating output for <(RULE_INPUT_ROOT)'
        },
      ],
    },
  ],
}