OLD | NEW |
| (Empty) |
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. | |
4 | |
5 { | |
6 'variables': { | |
7 'mac_deployment_target': '10.8' | |
8 }, | |
9 'conditions': [ | |
10 ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { | |
11 'targets': [ | |
12 { | |
13 'target_name': 'iossim', | |
14 'toolsets': ['host'], | |
15 'type': 'executable', | |
16 'variables': { | |
17 'developer_dir': '<!(xcode-select -print-path)', | |
18 # TODO(lliabraa): Once all builders are on Xcode 6 this variable can | |
19 # be removed and the actions gated by this variable can be run by | |
20 # default (crbug.com/385030). | |
21 'xcode_version': '<!(xcodebuild -version | grep Xcode | awk \'{print
$2}\')', | |
22 }, | |
23 'conditions': [ | |
24 ['xcode_version>="6.0"', { | |
25 'variables': { | |
26 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks', | |
27 }, | |
28 'defines': [ | |
29 'IOSSIM_USE_XCODE_6', | |
30 ], | |
31 'actions': [ | |
32 { | |
33 'action_name': 'generate_dvt_foundation_header', | |
34 'inputs': [ | |
35 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current
/DVTFoundation', | |
36 '<(PRODUCT_DIR)/class-dump', | |
37 ], | |
38 'outputs': [ | |
39 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h' | |
40 ], | |
41 'action': [ | |
42 # Actions don't provide a way to redirect stdout, so a custo
m | |
43 # script is invoked that will execute the first argument and | |
44 # write the output to the file specified as the second argum
ent. | |
45 # -I sorts classes, categories, and protocols by inheritance
. | |
46 # -C <regex> only displays classes matching regular expressi
on. | |
47 './redirect-stdout.sh', | |
48 '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidati
on|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework', | |
49 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h', | |
50 ], | |
51 'message': 'Generating DVTFoundation.h', | |
52 }, | |
53 { | |
54 'action_name': 'generate_dvt_core_simulator', | |
55 'inputs': [ | |
56 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.fr
amework/Versions/Current/CoreSimulator', | |
57 '<(PRODUCT_DIR)/class-dump', | |
58 ], | |
59 'outputs': [ | |
60 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h' | |
61 ], | |
62 'action': [ | |
63 # Actions don't provide a way to redirect stdout, so a custo
m | |
64 # script is invoked that will execute the first argument and | |
65 # write the output to the file specified as the second argum
ent. | |
66 # -I sorts classes, categories, and protocols by inheritance
. | |
67 # -C <regex> only displays classes matching regular expressi
on. | |
68 './redirect-stdout.sh', | |
69 '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/Pr
ivateFrameworks/CoreSimulator.framework', | |
70 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h', | |
71 ], | |
72 'message': 'Generating CoreSimulator.h', | |
73 }, | |
74 ], # actions | |
75 }, { # else: xcode_version<"6.0" | |
76 'variables': { | |
77 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.p
latform/Developer/Library/PrivateFrameworks', | |
78 }, | |
79 }], # xcode_version | |
80 ], # conditions | |
81 'dependencies': [ | |
82 '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host', | |
83 ], | |
84 'include_dirs': [ | |
85 '<(INTERMEDIATE_DIR)/iossim', | |
86 ], | |
87 'sources': [ | |
88 'iossim.mm', | |
89 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', | |
90 ], | |
91 'libraries': [ | |
92 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | |
93 ], | |
94 'actions': [ | |
95 { | |
96 'action_name': 'generate_dvt_iphone_sim_header', | |
97 'inputs': [ | |
98 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Ver
sions/Current/DVTiPhoneSimulatorRemoteClient', | |
99 '<(PRODUCT_DIR)/class-dump', | |
100 ], | |
101 'outputs': [ | |
102 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h' | |
103 ], | |
104 'action': [ | |
105 # Actions don't provide a way to redirect stdout, so a custom | |
106 # script is invoked that will execute the first argument and | |
107 # write the output to the file specified as the second argument. | |
108 # -I sorts classes, categories, and protocols by inheritance. | |
109 # -C <regex> only displays classes matching regular expression. | |
110 './redirect-stdout.sh', | |
111 '<(PRODUCT_DIR)/class-dump -I -CiPhoneSimulator <(iphone_sim_pat
h)/DVTiPhoneSimulatorRemoteClient.framework', | |
112 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h', | |
113 ], | |
114 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h', | |
115 }, | |
116 ], # actions | |
117 'xcode_settings': { | |
118 'ARCHS': ['x86_64'], | |
119 }, | |
120 }, | |
121 ], | |
122 }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)
"!="ninja" | |
123 'variables': { | |
124 'ninja_output_dir': 'ninja-iossim', | |
125 'ninja_product_dir': | |
126 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)', | |
127 }, | |
128 'targets': [ | |
129 { | |
130 'target_name': 'iossim', | |
131 'type': 'none', | |
132 'toolsets': ['host'], | |
133 'variables': { | |
134 # Gyp to rerun | |
135 're_run_targets': [ | |
136 'testing/iossim/iossim.gyp', | |
137 ], | |
138 }, | |
139 'includes': ['../../build/ios/mac_build.gypi'], | |
140 'actions': [ | |
141 { | |
142 'action_name': 'compile iossim', | |
143 'inputs': [], | |
144 'outputs': [], | |
145 'action': [ | |
146 '<@(ninja_cmd)', | |
147 'iossim', | |
148 ], | |
149 'message': 'Generating the iossim executable', | |
150 }, | |
151 ], | |
152 }, | |
153 ], | |
154 }], | |
155 ], | |
156 } | |
OLD | NEW |