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.9',
11 ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', {
14 'target_name': 'iossim',
18 'developer_dir': '<!(xcode-select -print-path)',
19 # TODO(lliabraa): Once all builders are on Xcode 6 this variable can
20 # be removed and the actions gated by this variable can be run by
21 # default (crbug.com/385030).
22 'xcode_version': '<!(xcodebuild -version | grep Xcode | awk \'{print $2}\')',
25 ['xcode_version>="6.0"', {
27 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks',
34 'action_name': 'generate_dvt_foundation_header',
36 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoundation',
37 '<(PRODUCT_DIR)/class-dump',
40 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h'
43 # Actions don't provide a way to redirect stdout, so a custom
44 # script is invoked that will execute the first argument and
45 # write the output to the file specified as the second argument.
46 # -I sorts classes, categories, and protocols by inheritance.
47 # -C <regex> only displays classes matching regular expression.
48 './redirect-stdout.sh',
49 '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidation|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework',
50 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h',
52 'message': 'Generating DVTFoundation.h',
55 'action_name': 'generate_dvt_core_simulator',
57 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/Current/CoreSimulator',
58 '<(PRODUCT_DIR)/class-dump',
61 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h'
64 # Actions don't provide a way to redirect stdout, so a custom
65 # script is invoked that will execute the first argument and
66 # write the output to the file specified as the second argument.
67 # -I sorts classes, categories, and protocols by inheritance.
68 # -C <regex> only displays classes matching regular expression.
69 './redirect-stdout.sh',
70 '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework',
71 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h',
73 'message': 'Generating CoreSimulator.h',
76 }, { # else: xcode_version<"6.0"
78 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
83 '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host',
86 '<(INTERMEDIATE_DIR)/iossim',
90 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
93 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
97 'action_name': 'generate_dvt_iphone_sim_header',
99 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Versions/Current/DVTiPhoneSimulatorRemoteClient',
100 '<(PRODUCT_DIR)/class-dump',
103 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h'
106 # Actions don't provide a way to redirect stdout, so a custom
107 # script is invoked that will execute the first argument and
108 # write the output to the file specified as the second argument.
109 # -I sorts classes, categories, and protocols by inheritance.
110 # -C <regex> only displays classes matching regular expression.
111 './redirect-stdout.sh',
112 '<(PRODUCT_DIR)/class-dump -I -CiPhoneSimulator <(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework',
113 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h',
115 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h',
123 }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)"!="ninja"
125 'ninja_output_dir': 'ninja-iossim',
127 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
131 'target_name': 'iossim',
133 'toolsets': ['host'],
137 'testing/iossim/iossim.gyp',
140 'includes': ['../../build/ios/mac_build.gypi'],
143 'action_name': 'compile iossim',
150 'message': 'Generating the iossim executable',