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

Side by Side 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, 1 month 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 unified diff | Download patch
« no previous file with comments | « build/ios/mac_build.gypi ('k') | third_party/protobuf/protobuf.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'targets': [ 6 'conditions': [
7 { 7 ['OS != "ios"', {
8 'target_name': 'iossim', 8 'targets': [
9 'conditions': [ 9 {
10 ['OS != "ios"', { 10 'target_name': 'iossim',
11 'type': 'executable', 11 'type': 'executable',
12 'variables': { 12 'variables': {
13 'developer_dir': '<!(xcode-select -print-path)', 13 'developer_dir': '<!(xcode-select -print-path)',
14 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platf orm/Developer/Library/PrivateFrameworks', 14 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.pla tform/Developer/Library/PrivateFrameworks',
15 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks' 15 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks'
16 },
17 'dependencies': [
18 'third_party/class-dump/class-dump.gyp:class-dump',
19 ],
20 'include_dirs': [
21 '<(INTERMEDIATE_DIR)/iossim',
22 ],
23 'sources': [
24 'iossim.mm',
25 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
26 ],
27 'libraries': [
28 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
29 ],
30 'actions': [
31 {
32 'action_name': 'generate_iphone_sim_header',
33 'inputs': [
34 '<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versio ns/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 wri te
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 }, 16 },
50 ], 17 'dependencies': [
51 }, { # else, OS == "ios" 18 'third_party/class-dump/class-dump.gyp:class-dump',
52 'type': 'none', 19 ],
53 'variables': { 20 'include_dirs': [
54 'ninja_output_dir': 'ninja-iossim', 21 '<(INTERMEDIATE_DIR)/iossim',
55 # Gyp to rerun 22 ],
56 're_run_targets': [ 23 'sources': [
57 'testing/iossim/iossim.gyp', 24 'iossim.mm',
25 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
26 ],
27 'libraries': [
28 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
29 ],
30 'actions': [
31 {
32 'action_name': 'generate_iphone_sim_header',
33 'inputs': [
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 },
58 ], 50 ],
59 }, 51 },
60 'includes': ['../../build/ios/mac_build.gypi'], 52 ],
61 'actions': [ 53 }, { # else, OS == "ios"
62 { 54 'variables': {
63 'action_name': 'compile iossim', 55 'ninja_output_dir': 'ninja-iossim',
64 'inputs': [], 56 'ninja_product_dir':
65 'outputs': [], 57 '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
66 'action': [ 58 },
67 '<@(ninja_cmd)', 59 # Generation is done via two actions: (1) compiling the executable with
68 'iossim', 60 # ninja, and (2) copying the executable into a location that is shared
69 ], 61 # with other projects. These actions are separated into two targets in
70 'message': 'Generating the iossim executable', 62 # order to be able to specify that the second action should not run
71 }, 63 # until the first action finishes (since the ordering of multiple
72 { 64 # actions in one target is defined only by inputs and outputs, and it's
73 'action_name': 'copy iossim', 65 # impossible to set correct inputs for the ninja build, so setting all
74 'inputs': [ 66 # the inputs and outputs isn't an option).
75 # TODO(ios): It should be possible to define the input, but 67 'targets': [
76 # adding it causes gyp to complain about duplicate id. 68 {
77 # '<(ninja_product_dir)/iossim', 69 'target_name': 'compile_iossim',
78 ], 70 'type': 'none',
79 'outputs': [ 71 'variables': {
80 '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim', 72 # Gyp to rerun
81 ], 73 're_run_targets': [
82 'action': [ 74 'testing/iossim/iossim.gyp',
83 'cp',
84 '<(ninja_product_dir)/iossim',
85 '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
86 ], 75 ],
87 }, 76 },
88 ], 77 'includes': ['../../build/ios/mac_build.gypi'],
89 }], 78 'actions': [
90 ], 79 {
91 }, 80 'action_name': 'compile iossim',
81 'inputs': [],
82 'outputs': [],
83 'action': [
84 '<@(ninja_cmd)',
85 'iossim',
86 ],
87 'message': 'Generating the iossim executable',
88 },
89 ],
90 },
91 {
92 'target_name': 'iossim',
93 'type': 'none',
94 'dependencies': [
95 'compile_iossim',
96 ],
97 'actions': [
98 {
99 'action_name': 'copy iossim',
100 'inputs': [
101 # TODO(ios): It should be possible to define the input, but
102 # adding it causes gyp to complain about duplicate id.
103 # '<(ninja_product_dir)/iossim',
104 ],
105 'outputs': [
106 '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
107 ],
108 'action': [
109 'cp',
110 '<(ninja_product_dir)/iossim',
111 '<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
112 ],
113 },
114 ],
115 },
116 ],
117 },
118 ],
92 ], 119 ],
93 } 120 }
OLDNEW
« 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