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

Unified Diff: third_party/protobuf/protobuf.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 | « testing/iossim/iossim.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/protobuf.gyp
diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.gyp
index 6b060f2d5c6efad576562b588fbc8b5e2580159d..5aa2b4f6b278ee41ea34c014670e49c10ff6c58e 100644
--- a/third_party/protobuf/protobuf.gyp
+++ b/third_party/protobuf/protobuf.gyp
@@ -24,7 +24,47 @@
'WIN32_LEAN_AND_MEAN', # Protobuf defines this itself.
],
},
- }]
+ }],
+ ['OS=="ios"', {
+ 'variables': {
+ 'ninja_output_dir': 'ninja-protoc',
+ 'ninja_product_dir':
+ '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
+ # Gyp to rerun
+ 're_run_targets': [
+ 'third_party/protobuf/protobuf.gyp',
+ ],
+ },
+ 'targets': [
+ {
+ # On iOS, generating protoc 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). The first target is given here; the second target is the
+ # normal protoc target under the condition that "OS==iOS".
+ 'target_name': 'compile_protoc',
+ 'type': 'none',
+ 'includes': ['../../build/ios/mac_build.gypi'],
+ 'actions': [
+ {
+ 'action_name': 'compile protoc',
+ 'inputs': [],
+ 'outputs': [],
+ 'action': [
+ '<@(ninja_cmd)',
+ 'protoc',
+ ],
+ 'message': 'Generating the C++ protocol buffers compiler',
+ },
+ ],
+ },
+ ],
+ }],
],
'targets': [
# The "lite" lib is about 1/7th the size of the heavy lib,
@@ -236,26 +276,11 @@
],
}, { # else, OS=="ios"
'type': 'none',
- 'variables': {
- 'ninja_output_dir': 'ninja-protoc',
- # Gyp to rerun
- 're_run_targets': [
- 'third_party/protobuf/protobuf.gyp',
- ],
- },
- 'includes': ['../../build/ios/mac_build.gypi'],
+ 'dependencies': [
+ 'compile_protoc',
+ ],
'actions': [
{
- 'action_name': 'compile protoc',
- 'inputs': [],
- 'outputs': [],
- 'action': [
- '<@(ninja_cmd)',
- 'protoc',
- ],
- 'message': 'Generating the C++ protocol buffers compiler',
- },
- {
'action_name': 'copy protoc',
'inputs': [
'<(ninja_product_dir)/protoc',
« no previous file with comments | « testing/iossim/iossim.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698