Home | History | Annotate | Download | only in analyzer
      1 # Copyright (c) 2014 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 # These gyp files create the following dependencies:
      6 #
      7 # test.gyp:
      8 #   #exe -> subdir/subdir.gyp#foo, subdir/subdir2/subdir2.gyp#subdir2
      9 #     foo.c
     10 #     subdir/subdir_source2.c
     11 #     conditional_source.c (if test_variable==1)
     12 #     action_input.c
     13 #     action_output.c
     14 #     rule_input.c
     15 #     rule_output.pdf
     16 #   #exe2
     17 #     exe2.c
     18 #   #exe3 -> subdir/subdir.gyp#foo, subdir/subdir.gyp#subdir2a
     19 #     exe3.c
     20 #   #all (type none) -> exe, exe3
     21 # 
     22 # subdir/subdir.gyp
     23 #   #foo
     24 #     subdir/subdir_source.c
     25 #     parent_source.c
     26 #   #subdir2a -> subdir2b
     27 #     subdir/subdir2_source.c
     28 #   #subdir2b
     29 #     subdir/subdir2b_source.c
     30 # 
     31 # subdir/subdir2/subdir2.gyp
     32 #   #subdir2
     33 #     subdir/subdir_source.h
     34 
     35 {
     36   'variables': {
     37     'test_variable%': 0,
     38     'variable_path': 'subdir',
     39    },
     40   'targets': [
     41     {
     42       'target_name': 'exe',
     43       'type': 'executable',
     44       'dependencies': [
     45         'subdir/subdir.gyp:foo',
     46         'subdir/subdir2/subdir2.gyp:subdir2',
     47       ],
     48       'sources': [
     49         'foo.c',
     50         '<(variable_path)/subdir_source2.c',
     51       ],
     52       'conditions': [
     53         ['test_variable==1', {
     54           'sources': [
     55             'conditional_source.c',
     56           ],
     57         }],
     58       ],
     59       'actions': [
     60         {
     61           'action_name': 'action',
     62           'inputs': [
     63             '<(PRODUCT_DIR)/product_dir_input.c',
     64             'action_input.c',
     65             '../bad_path1.h',
     66             '../../bad_path2.h',
     67           ],
     68           'outputs': [
     69             'action_output.c',
     70           ],
     71         },
     72       ],
     73       'rules': [
     74         {
     75           'rule_name': 'rule',
     76           'extension': 'pdf',
     77           'inputs': [
     78             'rule_input.c',
     79           ],
     80           'outputs': [
     81             'rule_output.pdf',
     82           ],
     83         },
     84       ],
     85     },
     86     {
     87       'target_name': 'exe2',
     88       'type': 'executable',
     89       'sources': [
     90         'exe2.c',
     91       ],
     92     },
     93     {
     94       'target_name': 'exe3',
     95       'type': 'executable',
     96       'dependencies': [
     97         'subdir/subdir.gyp:foo',
     98         'subdir/subdir.gyp:subdir2a',
     99       ],
    100       'sources': [
    101         'exe3.c',
    102       ],
    103     },
    104     {
    105       'target_name': 'all',
    106       'type': 'none',
    107       'dependencies': [
    108         'exe',
    109         'exe3',
    110       ],
    111     },
    112   ],
    113 }
    114