Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Unified Diff: testing/iossim/iossim.gyp

Issue 11301003: Specify dependences correctly when building mac tools for iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nit Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/ios/mac_build.gypi ('k') | third_party/protobuf/protobuf.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/iossim/iossim.gyp
diff --git a/testing/iossim/iossim.gyp b/testing/iossim/iossim.gyp
index 2894be0f82b1df9560543b789a65979c17012be3..45601f4742b3806fb1dc9c596fa3b74f01d5089c 100644
--- a/testing/iossim/iossim.gyp
+++ b/testing/iossim/iossim.gyp
@@ -3,91 +3,118 @@
# found in the LICENSE file.
{
- 'targets': [
- {
- 'target_name': 'iossim',
- 'conditions': [
- ['OS != "ios"', {
- 'type': 'executable',
- 'variables': {
- 'developer_dir': '<!(xcode-select -print-path)',
- 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
- 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks'
- },
- 'dependencies': [
- 'third_party/class-dump/class-dump.gyp:class-dump',
- ],
- 'include_dirs': [
- '<(INTERMEDIATE_DIR)/iossim',
- ],
- 'sources': [
- 'iossim.mm',
- '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
- ],
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
- ],
- 'actions': [
- {
- 'action_name': 'generate_iphone_sim_header',
- 'inputs': [
- '<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versions/Current/iPhoneSimulatorRemoteClient',
- '<(PRODUCT_DIR)/class-dump',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h'
- ],
- 'action': [
- # Actions don't provide a way to redirect stdout, so a custom
- # script is invoked that will execute the first argument and write
- # the output to the file specified as the second argument.
- './redirect-stdout.sh',
- '<(PRODUCT_DIR)/class-dump -CiPhoneSimulator <(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework',
- '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
- ],
- 'message': 'Generating header',
+ 'conditions': [
+ ['OS != "ios"', {
+ 'targets': [
+ {
+ 'target_name': 'iossim',
+ 'type': 'executable',
+ 'variables': {
+ 'developer_dir': '<!(xcode-select -print-path)',
+ 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
+ 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks'
},
- ],
- }, { # else, OS == "ios"
- 'type': 'none',
- 'variables': {
- 'ninja_output_dir': 'ninja-iossim',
- # Gyp to rerun
- 're_run_targets': [
- 'testing/iossim/iossim.gyp',
+ 'dependencies': [
+ 'third_party/class-dump/class-dump.gyp:class-dump',
+ ],
+ 'include_dirs': [
+ '<(INTERMEDIATE_DIR)/iossim',
+ ],
+ 'sources': [
+ 'iossim.mm',
+ '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
+ ],
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'generate_iphone_sim_header',
+ 'inputs': [
+ '<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versions/Current/iPhoneSimulatorRemoteClient',
+ '<(PRODUCT_DIR)/class-dump',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h'
+ ],
+ 'action': [
+ # Actions don't provide a way to redirect stdout, so a custom
+ # script is invoked that will execute the first argument and write
+ # the output to the file specified as the second argument.
+ './redirect-stdout.sh',
+ '<(PRODUCT_DIR)/class-dump -CiPhoneSimulator <(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework',
+ '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
+ ],
+ 'message': 'Generating header',
+ },
],
},
- 'includes': ['../../build/ios/mac_build.gypi'],
- 'actions': [
- {
- 'action_name': 'compile iossim',
- 'inputs': [],
- 'outputs': [],
- 'action': [
- '<@(ninja_cmd)',
- 'iossim',
+ ],
+ }, { # else, OS == "ios"
+ 'variables': {
+ 'ninja_output_dir': 'ninja-iossim',
+ 'ninja_product_dir':
+ '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
+ },
+ # Generation is done via two actions: (1) compiling the executable with
+ # ninja, and (2) copying the executable into a location that is shared
+ # with other projects. These actions are separated into two targets in
+ # order to be able to specify that the second action should not run
+ # until the first action finishes (since the ordering of multiple
+ # actions in one target is defined only by inputs and outputs, and it's
+ # impossible to set correct inputs for the ninja build, so setting all
+ # the inputs and outputs isn't an option).
+ 'targets': [
+ {
+ 'target_name': 'compile_iossim',
+ 'type': 'none',
+ 'variables': {
+ # Gyp to rerun
+ 're_run_targets': [
+ 'testing/iossim/iossim.gyp',
],
- 'message': 'Generating the iossim executable',
},
- {
- 'action_name': 'copy iossim',
- 'inputs': [
- # TODO(ios): It should be possible to define the input, but
- # adding it causes gyp to complain about duplicate id.
- # '<(ninja_product_dir)/iossim',
- ],
- 'outputs': [
- '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
- ],
- 'action': [
- 'cp',
- '<(ninja_product_dir)/iossim',
- '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
- ],
- },
- ],
- }],
- ],
- },
+ 'includes': ['../../build/ios/mac_build.gypi'],
+ 'actions': [
+ {
+ 'action_name': 'compile iossim',
+ 'inputs': [],
+ 'outputs': [],
+ 'action': [
+ '<@(ninja_cmd)',
+ 'iossim',
+ ],
+ 'message': 'Generating the iossim executable',
+ },
+ ],
+ },
+ {
+ 'target_name': 'iossim',
+ 'type': 'none',
+ 'dependencies': [
+ 'compile_iossim',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'copy iossim',
+ 'inputs': [
+ # TODO(ios): It should be possible to define the input, but
+ # adding it causes gyp to complain about duplicate id.
+ # '<(ninja_product_dir)/iossim',
+ ],
+ 'outputs': [
+ '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
+ ],
+ 'action': [
+ 'cp',
+ '<(ninja_product_dir)/iossim',
+ '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
],
}
« no previous file with comments | « build/ios/mac_build.gypi ('k') | third_party/protobuf/protobuf.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698