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",
98 if CONFIG["OS_TARGET"] == "Android":
103 if CONFIG["FUZZING"]:
104 pref_groups += ["fuzzing"]
105 pref_groups = tuple(sorted(pref_groups))
107 # Note: generate_static_pref_list.py relies on StaticPrefListAll.h being first.
108 gen_h = ["init/StaticPrefListAll.h"]
109 gen_h += ["StaticPrefsAll.h"]
110 gen_h += ["init/StaticPrefList_{}.h".format(pg) for pg in pref_groups]
111 gen_h += ["StaticPrefs_{}.h".format(pg) for pg in pref_groups]
113 gen_cpp = ["init/StaticPrefsCGetters.cpp"]
115 gen_rs = ["static_prefs.rs"]
118 "init/StaticPrefListBegin.h",
119 "init/StaticPrefListEnd.h",
120 "nsRelativeFilePref.h",
124 EXPORTS.mozilla += sorted(["!" + g for g in gen_h])
131 gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
135 script="init/generate_static_pref_list.py",
136 entry_point="emit_code",
137 inputs=["init/StaticPrefList.yaml"]
140 PYTHON_UNITTEST_MANIFESTS += [
148 SPHINX_TREES["/modules/libpref"] = "docs"
150 include("/ipc/chromium/chromium-config.mozbuild")
152 FINAL_LIBRARY = "xul"
154 DEFINES["OS_ARCH"] = CONFIG["OS_ARCH"]
155 DEFINES["MOZ_WIDGET_TOOLKIT"] = CONFIG["MOZ_WIDGET_TOOLKIT"]
157 if CONFIG["MOZ_SERVICES_SYNC"]:
158 DEFINES["MOZ_SERVICES_SYNC"] = True
160 if CONFIG["MOZ_BUILD_APP"] == "browser":
161 DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
163 if CONFIG["MOZ_WEBEXT_WEBIDL_ENABLED"]:
164 DEFINES["MOZ_WEBEXT_WEBIDL_ENABLED"] = True
166 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
167 if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
168 FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [
172 for arch in CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
173 FINAL_TARGET_FILES[arch] += [
174 "!/dist/fat-aar/output/{arch}/greprefs.js".format(arch=arch),
177 FINAL_TARGET_PP_FILES += [