Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'conditions': [ | 6 'conditions': [ |
| 7 ['OS != "ios"', { | 7 ['OS != "ios" or "<(GENERATOR)"=="ninja"', { |
| 8 'targets': [ | 8 'targets': [ |
| 9 { | 9 { |
| 10 'target_name': 'iossim', | 10 'target_name': 'iossim', |
| 11 'type': 'executable', | 11 'toolsets': ['host'], |
| 12 'variables': { | 12 'type': 'executable', |
| 13 'developer_dir': '<!(xcode-select -print-path)', | 13 'variables': { |
| 14 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.pla tform/Developer/Library/PrivateFrameworks', | 14 'developer_dir': '<!(xcode-select -print-path)', |
| 15 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks' | 15 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platf orm/Developer/Library/PrivateFrameworks', |
| 16 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks' | |
| 17 }, | |
| 18 'dependencies': [ | |
| 19 'third_party/class-dump/class-dump.gyp:class-dump#host', | |
| 20 ], | |
| 21 'include_dirs': [ | |
| 22 '<(INTERMEDIATE_DIR)/iossim', | |
| 23 ], | |
| 24 'sources': [ | |
| 25 'iossim.mm', | |
| 26 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', | |
| 27 ], | |
| 28 'libraries': [ | |
| 29 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | |
| 30 ], | |
| 31 'actions': [ | |
| 32 { | |
| 33 'action_name': 'generate_iphone_sim_header', | |
| 34 'inputs': [ | |
| 35 '<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versio ns/Current/iPhoneSimulatorRemoteClient', | |
| 36 '<(PRODUCT_DIR)/class-dump', | |
| 37 ], | |
| 38 'outputs': [ | |
| 39 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h' | |
| 40 ], | |
| 41 'action': [ | |
| 42 # Actions don't provide a way to redirect stdout, so a custom | |
| 43 # script is invoked that will execute the first argument and wri te | |
| 44 # the output to the file specified as the second argument. | |
| 45 './redirect-stdout.sh', | |
| 46 '<(PRODUCT_DIR)/class-dump -CiPhoneSimulator <(iphone_sim_path)/ iPhoneSimulatorRemoteClient.framework', | |
| 47 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', | |
| 48 ], | |
| 49 'message': 'Generating header', | |
| 16 }, | 50 }, |
| 17 'dependencies': [ | 51 ], |
| 18 'third_party/class-dump/class-dump.gyp:class-dump', | 52 }, |
| 19 ], | 53 ], |
| 20 'include_dirs': [ | 54 }, { # else, OS == "ios" |
|
stuartmorgan
2013/05/06 11:56:35
Fix comment.
justincohen
2013/05/06 14:17:36
Done.
| |
| 21 '<(INTERMEDIATE_DIR)/iossim', | 55 'variables': { |
| 22 ], | 56 'ninja_output_dir': 'ninja-iossim', |
| 23 'sources': [ | 57 'ninja_product_dir': |
| 24 'iossim.mm', | 58 '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)', |
| 25 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', | 59 }, |
| 26 ], | 60 'targets': [ |
| 27 'libraries': [ | 61 { |
| 28 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | 62 'target_name': 'iossim', |
| 29 ], | 63 'type': 'none', |
| 30 'actions': [ | 64 'variables': { |
| 31 { | 65 # Gyp to rerun |
| 32 'action_name': 'generate_iphone_sim_header', | 66 're_run_targets': [ |
| 33 'inputs': [ | 67 'testing/iossim/iossim.gyp', |
| 34 '<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Vers ions/Current/iPhoneSimulatorRemoteClient', | |
| 35 '<(PRODUCT_DIR)/class-dump', | |
| 36 ], | |
| 37 'outputs': [ | |
| 38 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h' | |
| 39 ], | |
| 40 'action': [ | |
| 41 # Actions don't provide a way to redirect stdout, so a custom | |
| 42 # script is invoked that will execute the first argument and w rite | |
| 43 # the output to the file specified as the second argument. | |
| 44 './redirect-stdout.sh', | |
| 45 '<(PRODUCT_DIR)/class-dump -CiPhoneSimulator <(iphone_sim_path )/iPhoneSimulatorRemoteClient.framework', | |
| 46 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', | |
| 47 ], | |
| 48 'message': 'Generating header', | |
| 49 }, | |
| 50 ], | 68 ], |
| 51 }, | 69 }, |
| 52 ], | 70 'includes': ['../../build/ios/mac_build.gypi'], |
| 53 }, { # else, OS == "ios" | 71 'actions': [ |
| 54 'variables': { | 72 { |
| 55 'ninja_output_dir': 'ninja-iossim', | 73 'action_name': 'compile iossim', |
| 56 'ninja_product_dir': | 74 'inputs': [], |
| 57 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)', | 75 'outputs': [], |
| 76 'action': [ | |
| 77 '<@(ninja_cmd)', | |
| 78 'iossim', | |
| 79 ], | |
| 80 'message': 'Generating the iossim executable', | |
| 81 }, | |
| 82 ], | |
| 58 }, | 83 }, |
| 59 'targets': [ | 84 ], |
| 60 { | 85 }], |
| 61 'target_name': 'iossim', | |
| 62 'type': 'none', | |
| 63 'variables': { | |
| 64 # Gyp to rerun | |
| 65 're_run_targets': [ | |
| 66 'testing/iossim/iossim.gyp', | |
| 67 ], | |
| 68 }, | |
| 69 'includes': ['../../build/ios/mac_build.gypi'], | |
| 70 'actions': [ | |
| 71 { | |
| 72 'action_name': 'compile iossim', | |
| 73 'inputs': [], | |
| 74 'outputs': [], | |
| 75 'action': [ | |
| 76 '<@(ninja_cmd)', | |
| 77 'iossim', | |
| 78 ], | |
| 79 'message': 'Generating the iossim executable', | |
| 80 }, | |
| 81 ], | |
| 82 }, | |
| 83 ], | |
| 84 }, | |
| 85 ], | |
| 86 ], | 86 ], |
| 87 } | 87 } |
| OLD | NEW |