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.
7 'mac_deployment_target': '10.8'
10 ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', {
13 'target_name': 'iossim',
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}\')',
24 ['xcode_version>="6.0"', {
26 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks',
33 'action_name': 'generate_dvt_foundation_header',
35 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoundation',
36 '<(PRODUCT_DIR)/class-dump',
39 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h'
42 # Actions don't provide a way to redirect stdout, so a custom
43 # script is invoked that will execute the first argument and
44 # write the output to the file specified as the second argument.
45 # -I sorts classes, categories, and protocols by inheritance.
46 # -C <regex> only displays classes matching regular expression.
47 './redirect-stdout.sh',
48 '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidation|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework',
49 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h',
51 'message': 'Generating DVTFoundation.h',
54 'action_name': 'generate_dvt_core_simulator',
56 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/Current/CoreSimulator',
57 '<(PRODUCT_DIR)/class-dump',
60 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h'
63 # Actions don't provide a way to redirect stdout, so a custom
64 # script is invoked that will execute the first argument and
65 # write the output to the file specified as the second argument.
66 # -I sorts classes, categories, and protocols by inheritance.
67 # -C <regex> only displays classes matching regular expression.
68 './redirect-stdout.sh',
69 '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework',
70 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h',
72 'message': 'Generating CoreSimulator.h',
75 }, { # else: xcode_version<"6.0"
77 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
82 '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host',
85 '<(INTERMEDIATE_DIR)/iossim',
89 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
92 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
96 'action_name': 'generate_dvt_iphone_sim_header',
98 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Versions/Current/DVTiPhoneSimulatorRemoteClient',
99 '<(PRODUCT_DIR)/class-dump',
102 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h'
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_path)/DVTiPhoneSimulatorRemoteClient.framework',
112 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h',
114 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h',
122 }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)"!="ninja"
124 'ninja_output_dir': 'ninja-iossim',
126 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
130 'target_name': 'iossim',
132 'toolsets': ['host'],
136 'testing/iossim/iossim.gyp',
139 'includes': ['../../build/ios/mac_build.gypi'],
142 'action_name': 'compile iossim',
149 'message': 'Generating the iossim executable',