Backed out changeset bcbab342eed8 (bug 1889658) for causing wpt reftest failures...
[gecko.git] / intl / locale / moz.build
blob10e7c5cfb172afaca4015a8264442d6bacf26a78
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.toml"]
9 TESTING_JS_MODULES += [
10     "tests/LangPackMatcherTestUtils.sys.mjs",
13 toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
15 if toolkit == "windows":
16     DIRS += ["windows"]
17 elif toolkit in ("cocoa", "uikit"):
18     DIRS += ["mac"]
19 elif toolkit == "gtk":
20     DIRS += ["gtk"]
21 elif toolkit == "android":
22     DIRS += ["android"]
24 XPIDL_SOURCES += [
25     "mozILocaleService.idl",
26     "mozIOSPreferences.idl",
29 XPIDL_MODULE = "locale"
31 EXPORTS += [
32     "nsLanguageAtomService.h",
33     "nsUConvPropertySearch.h",
36 EXPORTS.mozilla.intl += [
37     "AppDateTimeFormat.h",
38     "LocaleService.h",
39     "MozLocaleBindings.h",
40     "OSPreferences.h",
41     "Quotes.h",
44 UNIFIED_SOURCES += [
45     "AppDateTimeFormat.cpp",
46     "LocaleService.cpp",
47     "nsLanguageAtomService.cpp",
48     "nsUConvPropertySearch.cpp",
49     "OSPreferences.cpp",
50     "Quotes.cpp",
53 EXTRA_JS_MODULES += [
54     "LangPackMatcher.sys.mjs",
57 XPCOM_MANIFESTS += [
58     "components.conf",
61 FINAL_LIBRARY = "xul"
63 LOCAL_INCLUDES += [
64     "/intl/uconv",
67 RESOURCE_FILES += [
68     "language.properties",
71 prefixes = ("encodingsgroups",)
73 for prefix in prefixes:
74     input_file = prefix + ".properties"
75     header = prefix + ".properties.h"
76     GeneratedFile(header, script="props2arrays.py", inputs=[input_file])
78 if CONFIG["ENABLE_TESTS"]:
79     DIRS += ["tests/gtest"]
81 if CONFIG["COMPILE_ENVIRONMENT"]:
82     CbindgenHeader(
83         "fluent_langneg_ffi_generated.h",
84         inputs=["/intl/locale/rust/fluent-langneg-ffi"],
85     )
86     CbindgenHeader(
87         "oxilangtag_ffi_generated.h", inputs=["/intl/locale/rust/oxilangtag-ffi"]
88     )
89     CbindgenHeader(
90         "unic_langid_ffi_generated.h", inputs=["/intl/locale/rust/unic-langid-ffi"]
91     )
93     EXPORTS.mozilla.intl += [
94         "!fluent_langneg_ffi_generated.h",
95         "!oxilangtag_ffi_generated.h",
96         "!unic_langid_ffi_generated.h",
97     ]