Home | History | Annotate | Download | only in external
      1 # Copyright (c) 2009 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 # Test that the case where there are no inputs (other than the
      6 # file the rule applies to).
      7 {
      8   'target_defaults': {
      9     'msvs_cygwin_dirs': ['../../../../../../<(DEPTH)/third_party/cygwin'],
     10   },
     11   'targets': [
     12     {
     13       'target_name': 'external_rules',
     14       'type': 'none',
     15       'sources': [
     16         'file1.in',
     17         'file2.in',
     18       ],
     19       'conditions': [
     20         ['OS=="win"', {
     21           'dependencies': [
     22             'cygwin',
     23           ],
     24         }],
     25       ],
     26       'rules': [
     27         {
     28           'rule_name': 'copy_file',
     29           'extension': 'in',
     30           'msvs_external_rule': 1,
     31           'outputs': [
     32             '<(RULE_INPUT_ROOT).external_rules.out',
     33           ],
     34           'action': [
     35             'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)',
     36           ],
     37         },
     38       ],
     39     },
     40   ],
     41   'conditions': [
     42     ['OS=="win"', {
     43       'targets': [
     44         {
     45           'target_name': 'cygwin',
     46           'type': 'none',
     47           'actions': [
     48             {
     49               'action_name': 'setup_mount',
     50               'msvs_cygwin_shell': 0,
     51               'inputs': [
     52                 '../../../../../../<(DEPTH)/third_party/cygwin/setup_mount.bat',
     53               ],
     54               # Visual Studio requires an output file, or else the
     55               # custom build step won't run.
     56               'outputs': [
     57                 '<(INTERMEDIATE_DIR)/_always_run_setup_mount.marker',
     58               ],
     59               'action': ['<@(_inputs)'],
     60             },
     61           ],
     62         },
     63       ],
     64     }],
     65   ],
     66 }
     67