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/.
8 BUG_COMPONENT = ("Core", "Preferences: Backend")
10 if CONFIG["ENABLE_TESTS"]:
11 DIRS += ["test/gtest"]
13 XPCSHELL_TESTS_MANIFESTS += [
14 "test/unit/xpcshell.toml",
15 "test/unit_ipc/xpcshell.toml",
18 BROWSER_CHROME_MANIFESTS += ["test/browser/browser.toml"]
22 "nsIPrefLocalizedString.idl",
24 "nsIRelativeFilePref.idl",
96 if CONFIG["OS_TARGET"] == "Android":
101 if CONFIG["FUZZING"]:
102 pref_groups += ["fuzzing"]
103 pref_groups = tuple(sorted(pref_groups))
105 # Note: generate_static_pref_list.py relies on StaticPrefListAll.h being first.
106 gen_h = ["init/StaticPrefListAll.h"]
107 gen_h += ["StaticPrefsAll.h"]
108 gen_h += ["init/StaticPrefList_{}.h".format(pg) for pg in pref_groups]
109 gen_h += ["StaticPrefs_{}.h".format(pg) for pg in pref_groups]
111 gen_cpp = ["init/StaticPrefsCGetters.cpp"]
113 gen_rs = ["static_prefs.rs"]
116 "init/StaticPrefListBegin.h",
117 "init/StaticPrefListEnd.h",
118 "nsRelativeFilePref.h",
122 EXPORTS.mozilla += sorted(["!" + g for g in gen_h])
129 gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
133 script="init/generate_static_pref_list.py",
134 entry_point="emit_code",
135 inputs=["init/StaticPrefList.yaml"]
138 PYTHON_UNITTEST_MANIFESTS += [
146 SPHINX_TREES["/modules/libpref"] = "docs"
148 include("/ipc/chromium/chromium-config.mozbuild")
150 FINAL_LIBRARY = "xul"
152 DEFINES["OS_ARCH"] = CONFIG["OS_ARCH"]
153 DEFINES["MOZ_WIDGET_TOOLKIT"] = CONFIG["MOZ_WIDGET_TOOLKIT"]
155 if CONFIG["MOZ_SERVICES_SYNC"]:
156 DEFINES["MOZ_SERVICES_SYNC"] = True
158 if CONFIG["MOZ_BUILD_APP"] == "browser":
159 DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
161 if CONFIG["MOZ_WEBEXT_WEBIDL_ENABLED"]:
162 DEFINES["MOZ_WEBEXT_WEBIDL_ENABLED"] = True
164 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
165 if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
166 FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [
170 for arch in CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
171 FINAL_TARGET_FILES[arch] += [
172 "!/dist/fat-aar/output/{arch}/greprefs.js".format(arch=arch),
175 FINAL_TARGET_PP_FILES += [