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 ['OS!="ios" or "<(GENERATOR)"=="ninja"', {
10 'target_name': 'iossim',
14 'developer_dir': '<!(xcode-select -print-path)',
15 # TODO(lliabraa): Once all builders are on Xcode 6 this variable can
16 # be removed and the actions gated by this variable can be run by
17 # default (crbug.com/385030).
18 'xcode_version': '<!(xcodebuild -version | grep Xcode | awk \'{print $2}\')',
21 ['xcode_version=="6.0"', {
23 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks',
30 'action_name': 'generate_dvt_foundation_header',
32 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoundation',
33 '<(PRODUCT_DIR)/class-dump',
36 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h'
39 # Actions don't provide a way to redirect stdout, so a custom
40 # script is invoked that will execute the first argument and
41 # write the output to the file specified as the second argument.
42 # -I sorts classes, categories, and protocols by inheritance.
43 # -C <regex> only displays classes matching regular expression.
44 './redirect-stdout.sh',
45 '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidation|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework',
46 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h',
48 'message': 'Generating DVTFoundation.h',
51 'action_name': 'generate_dvt_core_simulator',
53 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/Current/CoreSimulator',
54 '<(PRODUCT_DIR)/class-dump',
57 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h'
60 # Actions don't provide a way to redirect stdout, so a custom
61 # script is invoked that will execute the first argument and
62 # write the output to the file specified as the second argument.
63 # -I sorts classes, categories, and protocols by inheritance.
64 # -C <regex> only displays classes matching regular expression.
65 './redirect-stdout.sh',
66 '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework',
67 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h',
69 'message': 'Generating CoreSimulator.h',
72 }, { # else: xcode_version!="6"
74 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
79 'third_party/class-dump/class-dump.gyp:class-dump#host',
82 '<(INTERMEDIATE_DIR)/iossim',
86 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
89 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
93 'action_name': 'generate_dvt_iphone_sim_header',
95 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Versions/Current/DVTiPhoneSimulatorRemoteClient',
96 '<(PRODUCT_DIR)/class-dump',
99 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h'
102 # Actions don't provide a way to redirect stdout, so a custom
103 # script is invoked that will execute the first argument and
104 # write the output to the file specified as the second argument.
105 # -I sorts classes, categories, and protocols by inheritance.
106 # -C <regex> only displays classes matching regular expression.
107 './redirect-stdout.sh',
108 '<(PRODUCT_DIR)/class-dump -I -CiPhoneSimulator <(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework',
109 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h',
111 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h',
117 '-Wno-objc-property-no-attribute',
122 }, { # else, OS=="ios" and "<(GENERATOR)"!="ninja"
124 'ninja_output_dir': 'ninja-iossim',
126 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
130 'target_name': 'iossim',
135 'testing/iossim/iossim.gyp',
138 'includes': ['../../build/ios/mac_build.gypi'],
141 'action_name': 'compile iossim',
148 'message': 'Generating the iossim executable',