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

Side by Side Diff: ios/chrome/tools/strings/generate_localizable_strings.gyp

Issue 2066533002: gyp: <(GENERATOR) is now always ninja, so simplify some conditionals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 # Builds an OS X command line tool to generate Localizable.strings and 5 # Builds an OS X command line tool to generate Localizable.strings and
6 # InfoPlist.strings from compiled locales.pak. 6 # InfoPlist.strings from compiled locales.pak.
7 7
8 { 8 {
9 'conditions': [ 9 'targets': [
10 ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { 10 {
11 'targets': [ 11 'target_name': 'generate_localizable_strings',
12 { 12 'type': 'executable',
13 'target_name': 'generate_localizable_strings', 13 'toolsets': ['host'],
14 'type': 'executable', 14 'dependencies': [
15 'toolsets': ['host'], 15 '../../../../base/base.gyp:base',
16 'dependencies': [ 16 '../../../../ui/base/ui_base.gyp:ui_data_pack',
17 '../../../../base/base.gyp:base',
18 '../../../../ui/base/ui_base.gyp:ui_data_pack',
19 ],
20 'sources': [
21 'generate_localizable_strings.mm',
22 ],
23 'libraries': [
24 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
25 ],
26 },
27 ], 17 ],
28 }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR) "!="ninja" 18 'sources': [
29 # Generation is done via two actions: (1) compiling the executable with 19 'generate_localizable_strings.mm',
30 # ninja, and (2) copying the executable into a location that is shared
31 # with other projects. These actions are separated into two targets in
32 # order to be able to specify that the second action should not run until
33 # the first action finishes (since the ordering of multiple actions in
34 # one target is defined only by inputs and outputs, and it's impossible
35 # to set correct inputs for the ninja build, so setting all the inputs
36 # and outputs isn't an option).
37 'variables': {
38 # Hardcode the ninja_product_dir variable to avoid having to include
39 # mac_build.gypi, as otherwise the re-generation of the project will
40 # happen twice while running gyp. It's a bit fragile, but if it gets
41 # out of sync we'll know as soon as anyone does a clobber build
42 # because it won't find the input.
43 'ninja_output_dir': 'ninja-localizable_string_tool',
44 'ninja_product_dir':
45 '../../../../xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
46 # Gyp to rerun
47 're_run_targets': [
48 'ios/chrome/tools/strings/generate_localizable_strings.gyp',
49 ],
50 },
51 'targets': [
52 {
53 'target_name': 'compile_generate_localizable_strings',
54 'type': 'none',
55 'includes': ['../../../../build/ios/mac_build.gypi'],
56 'actions': [
57 {
58 'action_name': 'compile generate_localizable_strings',
59 'inputs': [],
60 'outputs': [],
61 'action': [
62 '<@(ninja_cmd)',
63 'generate_localizable_strings',
64 ],
65 'message':
66 'Generating the generate_localizable_strings executable',
67 },
68 ],
69 },
70 {
71 'target_name': 'generate_localizable_strings',
72 'type': 'none',
73 'dependencies': [
74 'compile_generate_localizable_strings',
75 ],
76 'actions': [
77 {
78 'action_name': 'copy generate_localizable_strings',
79 'inputs': [
80 '<(ninja_product_dir)/generate_localizable_strings',
81 ],
82 'outputs': [
83 '<(PRODUCT_DIR)/generate_localizable_strings',
84 ],
85 'action': [
86 'cp',
87 '<(ninja_product_dir)/generate_localizable_strings',
88 '<(PRODUCT_DIR)/generate_localizable_strings',
89 ],
90 },
91 ],
92 },
93 ], 20 ],
94 }], 21 'libraries': [
22 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
23 ],
24 },
95 ], 25 ],
96 } 26 }
OLDNEW
« build/common.gypi ('K') | « build/ios/mac_build.gypi ('k') | testing/iossim/iossim.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698