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 'foo/bar/baz.gencc', 38 'a/b/c.gencc', 39 'main.cc', 40 ], 41 'conditions': [ 42 ['OS=="win"', { 43 'dependencies': [ 44 'cygwin', 45 ], 46 }], 47 ], 48 'rules': [ 49 { 50 'rule_name': 'gencc', 51 'extension': 'gencc', 52 'msvs_external_rule': 1, 53 'inputs': [ 54 '<(DEPTH)/copy-file.py', 55 ], 56 'outputs': [ 57 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).cc', 58 ], 59 'action': [ 60 'python', '<@(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', 61 ], 62 'process_outputs_as_sources': 1, 63 }, 64 ], 65 }, 66 ], 67 'conditions': [ 68 ['OS=="win"', { 69 'targets': [ 70 { 71 'target_name': 'cygwin', 72 'type': 'none', 73 'actions': [ 74 { 75 'action_name': 'setup_mount', 76 'msvs_cygwin_shell': 0, 77 'inputs': [ 78 '../../../../../../<(DEPTH)/third_party/cygwin/setup_mount.bat', 79 ], 80 # Visual Studio requires an output file, or else the 81 # custom build step won't run. 82 'outputs': [ 83 '<(INTERMEDIATE_DIR)/_always_run_setup_mount.marker', 84 ], 85 'action': ['<@(_inputs)'], 86 }, 87 ], 88 }, 89 ], 90 }], 91 ], 92 } 93