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

Side by Side Diff: third_party/libphonenumber/libphonenumber.gyp

Issue 6803005: Autofill phone number enhancements and integration of Phone Number Util Library: part 1 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6 'variables': {
7 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
8 },
9 'target_defaults': {
10 'include_dirs': [
11 '../..', # add it first, so scrc/base headers are used
Mark Mentovai 2011/04/27 16:53:01 1. In the comment, src/base, not scrc/base. 2. As
GeorgeY 2011/04/28 07:21:18 Done.
12 # instead of the ones brought with the library
Mark Mentovai 2011/04/27 16:53:01 Why didn’t you use all 80 columns at your disposal
GeorgeY 2011/04/28 07:21:18 Done.
13 # as cc files would be taken from the main
14 # chrome tree as well.
15 './cpp/src',
Mark Mentovai 2011/04/27 16:53:01 No leading ./
GeorgeY 2011/04/28 07:21:18 Done.
16 '<(protoc_out_dir)',
17 '../protobuf/src',
18 '../icu/public/common',
19 '../icu/public/i18n',
20 ],
21 'defines': [
Mark Mentovai 2011/04/27 16:53:01 Something’s wrong with the indentation here.
GeorgeY 2011/04/28 07:21:18 Done.
22 'U_USING_ICU_NAMESPACE=0',
23 ],
24 'conditions': [
Mark Mentovai 2011/04/27 16:53:01 And here.
GeorgeY 2011/04/28 07:21:18 Done.
25 ['OS!="win" or component=="static_library"', {
26 'defines': [
27 'U_STATIC_IMPLEMENTATION',
28 ],
29 }],
30 ],
31 },
32 'targets': [
33 {
34 'target_name': 'libphonenumber',
35 'type': '<(library)',
36 'dependencies': [
37 'phonenumber_proto',
Mark Mentovai 2011/04/27 16:53:01 Fix indentation.
GeorgeY 2011/04/28 07:21:18 Done.
38 ],
39 'sources': [
40 'chrome/regexp_adapter_icuregexp.cc',
Mark Mentovai 2011/04/27 16:53:01 Fix indentation.
GeorgeY 2011/04/28 07:21:18 Done.
41 'cpp/src/default_logger.cc',
42 'cpp/src/logger_adapter.cc',
43 # Generated by src/embed_binary_data.sh
Mark Mentovai 2011/04/27 16:53:01 And you’ve checked this in, right?
GeorgeY 2011/04/28 07:21:18 They did - removed comment, as it is a remnant fro
44 'cpp/src/metadata.cc',
45 'cpp/src/phonenumberutil.cc',
46 'cpp/src/stringutil.cc',
47 'cpp/src/utf/rune.c',
48 'cpp/src/utf/unicodetext.cc',
49 'cpp/src/utf/unilib.cc',
50 # Generated by phonenumber_proto.
51 '<(protoc_out_dir)/phonemetadata.pb.cc',
52 '<(protoc_out_dir)/phonenumber.pb.cc',
53 ],
54 'conditions': [
55 ['OS=="win"', {
56 'defines': [
57 'COMPILER_MSVC=1',
Mark Mentovai 2011/04/27 16:53:01 Really? Why not just #include "build/build_config.
GeorgeY 2011/04/28 07:21:18 Unfortunately they do not include it everywhere it
Mark Mentovai 2011/04/28 14:27:03 GeorgeY wrote:
GeorgeY 2011/05/02 23:36:59 Done.
58 'OS_WIN=1',
59 'ARCH_CPU_X86_FAMILY=1',
60 ],
61 'action': [
62 '/wo4309',
63 ],
64 },],
Mark Mentovai 2011/04/27 16:53:01 Usually just }],. Same on line 71.
GeorgeY 2011/04/28 07:21:18 Done.
65 ['OS=="linux"', {
66 'defines': [
67 'COMPILER_GCC=1',
Mark Mentovai 2011/04/27 16:53:01 Same.
GeorgeY 2011/04/28 07:21:18 They use them in their makefile, instead of includ
68 'OS_POSIX=1',
69 'OS_LINUX=1',
70 ],
71 },],
72 ['OS=="mac"', {
73 'defines': [
74 'OS_MAC=1',
Mark Mentovai 2011/04/27 16:53:01 Same. Chrome code doesn’t even use OS_MAC, it’s O
GeorgeY 2011/04/28 07:21:18 They use them in their makefile, instead of includ
75 ],
76 }], # OS=="mac"
77 ],
78 },
79 {
80 # Protobuf compiler / generate rule for the phones
81 'target_name': 'phonenumber_proto',
82 'type': 'none',
83 'sources': [
84 'cpp/src/phonemetadata.proto',
Mark Mentovai 2011/04/27 16:53:01 Indentation. Go back through this file and make su
GeorgeY 2011/04/28 07:21:18 Done.
85 'cpp/src/phonenumber.proto',
86 ],
87 'rules': [
88 {
89 'rule_name': 'genproto',
90 'extension': 'proto',
91 'inputs': [
92 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
93 ],
94 'variables': {
95 # The protoc compiler requires a proto_path argument with the
96 # directory containing the .proto file.
97 # There's no generator variable that corresponds to this, so fake it.
98 'rule_input_relpath': 'cpp/src',
99 },
100 'outputs': [
101 '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.h',
102 '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.cc',
103 ],
104 'action': [
105 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
106 '--proto_path=./<(rule_input_relpath)',
Mark Mentovai 2011/04/27 16:53:01 The leading ./ on this line and the next aren’t ne
GeorgeY 2011/04/28 07:21:18 Done.
107 './<(rule_input_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
108 '--cpp_out=<(protoc_out_dir)',
109 ],
110 'message': 'Generating C++ code from <(RULE_INPUT_PATH)',
111 },
112 ],
113 'dependencies': [
114 '../protobuf/protobuf.gyp:protobuf_lite',
115 '../protobuf/protobuf.gyp:protoc#host',
116 ],
117 'direct_dependent_settings': {
118 'include_dirs': [
119 '<(protoc_out_dir)',
Mark Mentovai 2011/04/27 16:53:01 Indentation!
GeorgeY 2011/04/28 07:21:18 Done.
120 ]
121 },
122 'export_dependent_settings': [
Mark Mentovai 2011/04/27 16:53:01 Is this needed?
GeorgeY 2011/04/28 07:21:18 Yes, it is needed - otherwise they are generated i
123 '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
124 ],
125 },
126 {
127 'target_name': 'libphonenumber_unittests',
128 'type': 'executable',
129 'sources': [
130 '../../base/test/run_all_unittests.cc',
131 'cpp/src/phonenumberutil_test.cc',
132 'cpp/src/regexp_adapter_unittest.cc',
133 'cpp/src/stringutil_test.cc',
134 'cpp/src/test_metadata.cc',
135 ],
136 'dependencies': [
137 '../icu/icu.gyp:icui18n',
138 '../icu/icu.gyp:icuuc',
139 '../protobuf/protobuf.gyp:protobuf_lite',
140 '../../base/base.gyp:base',
141 '../../base/base.gyp:test_support_base',
142 '../../testing/gmock.gyp:gmock',
143 '../../testing/gtest.gyp:gtest',
144 'libphonenumber',
145 ],
146 'conditions': [
Mark Mentovai 2011/04/27 16:53:01 As before.
GeorgeY 2011/04/28 07:21:18 As before - I need to modify their protobuf files
147 ['OS=="win"', {
148 'defines': [
149 'COMPILER_MSVC=1',
150 'OS_WIN=1',
151 'ARCH_CPU_X86_FAMILY=1',
152 ],
153 'action': [
154 '/wo4309',
155 ],
156 },],
157 ['OS=="linux"', {
158 'defines': [
159 'COMPILER_GCC=1',
160 'OS_POSIX=1',
161 'OS_LINUX=1',
162 ],
163 },],
164 ['OS=="mac"', {
165 'defines': [
166 'OS_MAC=1',
167 ],
168 }], # OS=="mac"
169 ],
170 },
171 ]
Mark Mentovai 2011/04/27 16:53:01 When you have this at the same indentation level a
GeorgeY 2011/04/28 07:21:18 Done.
172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698