OLD | NEW |
1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 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 'variables': { | 6 'variables': { |
7 'conditions': [ | 7 'conditions': [ |
8 ['inside_chromium_build==0', { | 8 ['inside_chromium_build==0', { |
9 'webkit_src_dir': '../../../../..', | 9 'webkit_src_dir': '../../../../..', |
10 },{ | 10 },{ |
11 'webkit_src_dir': '../../third_party/WebKit', | 11 'webkit_src_dir': '../../third_party/WebKit', |
12 }], | 12 }], |
13 ], | 13 ], |
14 }, | 14 }, |
15 'targets': [ | 15 'targets': [ |
16 { | 16 { |
17 'target_name': 'webkit_version', | |
18 'type': 'none', | |
19 'actions': [ | |
20 { | |
21 'action_name': 'webkit_version', | |
22 'inputs': [ | |
23 '<(script)', | |
24 '<(webkit_src_dir)<(version_file)', | |
25 '../../build/util/lastchange.py', # Used by the script. | |
26 ], | |
27 'outputs': [ | |
28 '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h', | |
29 ], | |
30 'action': ['python', '<(script)', '<(webkit_src_dir)', | |
31 '<(version_file)', '<(SHARED_INTERMEDIATE_DIR)'], | |
32 'variables': { | |
33 'script': '../build/webkit_version.py', | |
34 # version_file is a relative path from |webkit_src_dir| to | |
35 # the version file. But gyp will eat the variable unless | |
36 # it looks like an absolute path, so write it like one and | |
37 # then use it carefully above. | |
38 'version_file': '/Source/WebCore/Configurations/Version.xcconfig', | |
39 }, | |
40 }, | |
41 ], | |
42 'direct_dependent_settings': { | |
43 'include_dirs': [ | |
44 '<(SHARED_INTERMEDIATE_DIR)', | |
45 ], | |
46 }, | |
47 # Dependents may rely on files generated by this target or one of its | |
48 # own hard dependencies. | |
49 'hard_dependency': 1, | |
50 }, | |
51 { | |
52 'target_name': 'user_agent', | 17 'target_name': 'user_agent', |
53 'type': '<(component)', | 18 'type': '<(component)', |
54 'defines': [ | 19 'defines': [ |
55 'WEBKIT_USER_AGENT_IMPLEMENTATION', | 20 'WEBKIT_USER_AGENT_IMPLEMENTATION', |
56 ], | 21 ], |
57 'dependencies': [ | 22 'dependencies': [ |
58 'webkit_version', | |
59 '<(DEPTH)/base/base.gyp:base', | 23 '<(DEPTH)/base/base.gyp:base', |
60 '<(DEPTH)/base/base.gyp:base_i18n', | 24 '<(DEPTH)/base/base.gyp:base_i18n', |
61 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:d
ynamic_annotations', | |
62 ], | 25 ], |
63 'sources': [ | 26 'sources': [ |
64 'user_agent.cc', | 27 'user_agent.cc', |
65 'user_agent.h', | 28 'user_agent.h', |
66 'user_agent_util.cc', | 29 'user_agent_util.cc', |
| 30 'user_agent_util_ios.mm', |
67 'user_agent_util.h', | 31 'user_agent_util.h', |
68 'webkit_user_agent_export.h', | 32 'webkit_user_agent_export.h', |
69 ], | 33 ], |
| 34 'conditions': [ |
| 35 ['OS == "ios"', { |
| 36 # iOS has different user-agent construction utilities, since the |
| 37 # version strings is not derived from webkit_version, and follows |
| 38 # a different format. |
| 39 'sources!': [ |
| 40 'user_agent_util.cc', |
| 41 ], |
| 42 }, { # OS != "ios" |
| 43 'dependencies': [ |
| 44 'webkit_version', |
| 45 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.g
yp:dynamic_annotations', |
| 46 ], |
| 47 }], |
| 48 ], |
70 }, | 49 }, |
71 ], | 50 ], |
| 51 'conditions': [ |
| 52 ['OS != "ios"', { |
| 53 'targets': [ |
| 54 { |
| 55 'target_name': 'webkit_version', |
| 56 'type': 'none', |
| 57 'actions': [ |
| 58 { |
| 59 'action_name': 'webkit_version', |
| 60 'inputs': [ |
| 61 '<(script)', |
| 62 '<(webkit_src_dir)<(version_file)', |
| 63 '../../build/util/lastchange.py', # Used by the script. |
| 64 ], |
| 65 'outputs': [ |
| 66 '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h', |
| 67 ], |
| 68 'action': ['python', '<(script)', '<(webkit_src_dir)', |
| 69 '<(version_file)', '<(SHARED_INTERMEDIATE_DIR)'], |
| 70 'variables': { |
| 71 'script': '../build/webkit_version.py', |
| 72 # version_file is a relative path from |webkit_src_dir| to |
| 73 # the version file. But gyp will eat the variable unless |
| 74 # it looks like an absolute path, so write it like one and |
| 75 # then use it carefully above. |
| 76 'version_file': '/Source/WebCore/Configurations/Version.xcconfig
', |
| 77 }, |
| 78 }, |
| 79 ], |
| 80 'direct_dependent_settings': { |
| 81 'include_dirs': [ |
| 82 '<(SHARED_INTERMEDIATE_DIR)', |
| 83 ], |
| 84 }, |
| 85 # Dependents may rely on files generated by this target or one of its |
| 86 # own hard dependencies. |
| 87 'hard_dependency': 1, |
| 88 }, |
| 89 ], |
| 90 }], |
| 91 ], |
72 } | 92 } |
OLD | NEW |