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
3 # found in the LICENSE file.
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
7 # used to run ninja as script to work around this.
10 # 'target_name': 'foo',
13 # # The name of a directory used for ninja. This cannot be shared with
14 # # another mac build.
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)',
20 # # The list of all the gyp files that contain the targets to run.
25 # 'includes': ['path_to/mac_build.gypi'],
28 # 'action_name': 'compile foo',
33 # # All the targets to build.
43 'parent_generator%': '<(GENERATOR)',
45 'parent_generator%': '<(parent_generator)',
46 # Common ninja command line flags.
48 # Bounce through clean_env to clean up the environment so things
49 # set by the iOS build don't pollute the Mac build.
50 '<(DEPTH)/build/ios/clean_env.py',
51 # ninja must be found in the PATH.
52 'ADD_TO_PATH=<!(echo $PATH)',
55 '<(ninja_product_dir)',
58 # Common syntax to rerun gyp to generate the Mac projects.
62 # Don't use anything set for the iOS side of things.
63 '--ignore-environment',
66 # Generate files into xcodebuild/ninja
67 '-Goutput_dir=xcodebuild/<(ninja_output_dir)',
68 # nacl isn't in the iOS checkout, make sure it's turned off
70 # Add a variable to handle specific cases for mac_build.
72 # Pass through the Mac SDK version.
73 '-Dmac_sdk=<(mac_sdk)',
74 '-Dparent_generator=<(parent_generator)'
77 # Rerun gyp for each of the projects needed. This is what actually
78 # generates the projects on disk.
79 're_run_gyp_execution':
80 '<!(cd <(DEPTH) && <@(re_run_gyp) <@(re_run_targets))',
82 # Since these are used to generate things needed by other targets, make
83 # them hard dependencies so they are always built first.