Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / tools / gyp / test / rules-dirname / src / subdir / input-rule-dirname.gyp
1 # Copyright (c) 2011 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
5 {
6   'targets': [
7     {
8       'target_name': 'print_rule_input_path',
9       'type': 'none',
10       'msvs_cygwin_shell': 0,
11       'sources': [
12         'foo/bar/baz.printvars',
13         'a/b/c.printvars',
14       ],
15       'rules': [
16         {
17           'rule_name': 'printvars',
18           'extension': 'printvars',
19           'inputs': [
20             'printvars.py',
21           ],
22           'outputs': [
23             '<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).printed',
24           ],
25           'action': [
26             'python', '<@(_inputs)', '<(RULE_INPUT_DIRNAME)', '<@(_outputs)',
27           ],
28         },
29       ],
30     },
31     {
32       'target_name': 'gencc_int_output',
33       'type': 'executable',
34       'msvs_cygwin_shell': 0,
35       'msvs_cygwin_dirs': ['../../../../../../<(DEPTH)/third_party/cygwin'],
36       'sources': [
37         'nodir.gencc',
38         'foo/bar/baz.gencc',
39         'a/b/c.gencc',
40         'main.cc',
41       ],
42       'conditions': [
43         ['OS=="win"', {
44           'dependencies': [
45             'cygwin',
46           ],
47         }],
48       ],
49       'rules': [
50         {
51           'rule_name': 'gencc',
52           'extension': 'gencc',
53           'msvs_external_rule': 1,
54           'inputs': [
55             '<(DEPTH)/copy-file.py',
56           ],
57           'outputs': [
58             '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).cc',
59           ],
60           'action': [
61             'python', '<@(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
62           ],
63           'process_outputs_as_sources': 1,
64         },
65       ],
66     },
67   ],
68   'conditions': [
69     ['OS=="win"', {
70       'targets': [
71         {
72           'target_name': 'cygwin',
73           'type': 'none',
74           'actions': [
75             {
76               'action_name': 'setup_mount',
77               'msvs_cygwin_shell': 0,
78               'inputs': [
79                 '../../../../../../<(DEPTH)/third_party/cygwin/setup_mount.bat',
80               ],
81               # Visual Studio requires an output file, or else the
82               # custom build step won't run.
83               'outputs': [
84                 '<(INTERMEDIATE_DIR)/_always_run_setup_mount.marker',
85               ],
86               'action': ['<@(_inputs)'],
87             },
88           ],
89         },
90       ],
91     }],
92   ],
93 }