| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Xcode throws an error if an iOS target depends on a Mac OS X target. So | 5 # Xcode throws an error if an iOS target depends on a Mac OS X target. So |
| 6 # any place a utility program needs to be build and run, an action is | 6 # any place a utility program needs to be build and run, an action is |
| 7 # used to run ninja as script to work around this. | 7 # used to run ninja as script to work around this. |
| 8 # Example: | 8 # Example: |
| 9 # { | 9 # { |
| 10 # 'target_name': 'foo', | 10 # 'target_name': 'foo', |
| 11 # 'type': 'none', | 11 # 'type': 'none', |
| 12 # 'variables': { | 12 # 'variables': { |
| 13 # # The name of a directory used for ninja. This cannot be shared with | 13 # # The name of a directory used for ninja. This cannot be shared with |
| 14 # # another mac build. | 14 # # another mac build. |
| 15 # 'ninja_output_dir': 'ninja-foo', | 15 # 'ninja_output_dir': 'ninja-foo', |
| 16 # # The full path to the location in which the ninja executable should be |
| 17 # # placed. This cannot be shared with another mac build. |
| 18 # 'ninja_product_dir': |
| 19 # '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)', |
| 16 # # The list of all the gyp files that contain the targets to run. | 20 # # The list of all the gyp files that contain the targets to run. |
| 17 # 're_run_targets': [ | 21 # 're_run_targets': [ |
| 18 # 'foo.gyp', | 22 # 'foo.gyp', |
| 19 # ], | 23 # ], |
| 20 # }, | 24 # }, |
| 21 # 'includes': ['path_to/mac_build.gypi'], | 25 # 'includes': ['path_to/mac_build.gypi'], |
| 22 # 'actions': [ | 26 # 'actions': [ |
| 23 # { | 27 # { |
| 24 # 'action_name': 'compile foo', | 28 # 'action_name': 'compile foo', |
| 25 # 'inputs': [], | 29 # 'inputs': [], |
| 26 # 'outputs': [], | 30 # 'outputs': [], |
| 27 # 'action': [ | 31 # 'action': [ |
| 28 # '<@(ninja_cmd)', | 32 # '<@(ninja_cmd)', |
| 29 # # All the targets to build. | 33 # # All the targets to build. |
| 30 # 'foo1', | 34 # 'foo1', |
| 31 # 'foo2', | 35 # 'foo2', |
| 32 # ], | 36 # ], |
| 33 # }, | 37 # }, |
| 34 # ], | 38 # ], |
| 35 # } | 39 # } |
| 36 { | 40 { |
| 37 'variables': { | 41 'variables': { |
| 38 # Convenience variable pointing to the ninja product directory. | |
| 39 'ninja_product_dir': | |
| 40 '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)', | |
| 41 | |
| 42 # Common ninja command line flags. | 42 # Common ninja command line flags. |
| 43 'ninja_cmd': [ | 43 'ninja_cmd': [ |
| 44 # Bounce through clean_env to clean up the environment so things | 44 # Bounce through clean_env to clean up the environment so things |
| 45 # set by the iOS build don't pollute the Mac build. | 45 # set by the iOS build don't pollute the Mac build. |
| 46 '<(DEPTH)/build/ios/clean_env.py', | 46 '<(DEPTH)/build/ios/clean_env.py', |
| 47 # ninja must be found in the PATH. | 47 # ninja must be found in the PATH. |
| 48 'ADD_TO_PATH=<!(echo $PATH)', | 48 'ADD_TO_PATH=<!(echo $PATH)', |
| 49 'ninja', | 49 'ninja', |
| 50 '-C', | 50 '-C', |
| 51 '<(ninja_product_dir)', | 51 '<(ninja_product_dir)', |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 | 70 |
| 71 # Rerun gyp for each of the projects needed. This is what actually | 71 # Rerun gyp for each of the projects needed. This is what actually |
| 72 # generates the projects on disk. | 72 # generates the projects on disk. |
| 73 're_run_gyp_execution': | 73 're_run_gyp_execution': |
| 74 '<!(cd <(DEPTH) && <@(re_run_gyp) <@(re_run_targets))', | 74 '<!(cd <(DEPTH) && <@(re_run_gyp) <@(re_run_targets))', |
| 75 }, | 75 }, |
| 76 # Since these are used to generate things needed by other targets, make | 76 # Since these are used to generate things needed by other targets, make |
| 77 # them hard dependencies so they are always built first. | 77 # them hard dependencies so they are always built first. |
| 78 'hard_dependency': 1, | 78 'hard_dependency': 1, |
| 79 } | 79 } |
| OLD | NEW |