blob: 24fb683160e002a8bef3742e11b18d950e916e18 [file] [log] [blame]
Ben Murdoch85b71792012-04-11 18:30:58 +01001# Copyright 2011 the V8 project authors. All rights reserved.
2# Redistribution and use in source and binary forms, with or without
3# modification, are permitted provided that the following conditions are
4# met:
5#
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of Google Inc. nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28{
29 'variables': {
30 # TODO(cira): Find out how to pass this value for arbitrary embedder.
31 # Chromium sets it in common.gypi and does force include of that file for
32 # all sub projects.
33 'icu_src_dir%': '../../../../third_party/icu',
34 },
35 'targets': [
36 {
37 'target_name': 'i18n_api',
38 'type': 'static_library',
39 'sources': [
40 'break-iterator.cc',
41 'break-iterator.h',
42 'collator.cc',
43 'collator.h',
44 'datetime-format.cc',
45 'datetime-format.h',
46 'i18n-extension.cc',
47 'i18n-extension.h',
48 'i18n-locale.cc',
49 'i18n-locale.h',
50 'i18n-natives.h',
51 'i18n-utils.cc',
52 'i18n-utils.h',
53 'language-matcher.cc',
54 'language-matcher.h',
55 'number-format.cc',
56 'number-format.h',
57 '<(SHARED_INTERMEDIATE_DIR)/i18n-js.cc',
58 ],
59 'include_dirs': [
60 '<(icu_src_dir)/public/common',
61 # v8/ is root for all includes.
62 '../../..'
63 ],
64 'dependencies': [
65 '<(icu_src_dir)/icu.gyp:*',
66 'js2c_i18n#host',
67 '../../../tools/gyp/v8.gyp:v8',
68 ],
69 'direct_dependent_settings': {
70 # Adds -Iv8 for embedders.
71 'include_dirs': [
72 '../../..'
73 ],
74 },
75 },
76 {
77 'target_name': 'js2c_i18n',
78 'type': 'none',
79 'toolsets': ['host'],
80 'variables': {
81 'js_files': [
82 'i18n.js'
83 ],
84 },
85 'actions': [
86 {
87 'action_name': 'js2c_i18n',
88 'inputs': [
89 'i18n-js2c.py',
90 '<@(js_files)',
91 ],
92 'outputs': [
93 '<(SHARED_INTERMEDIATE_DIR)/i18n-js.cc',
94 ],
95 'action': [
96 'python',
97 'i18n-js2c.py',
98 '<@(_outputs)',
99 '<@(js_files)'
100 ],
101 },
102 ],
103 },
104 ], # targets
105}