summaryrefslogtreecommitdiffstats
path: root/modules/libpref/moz.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /modules/libpref/moz.build
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--modules/libpref/moz.build174
1 files changed, 174 insertions, 0 deletions
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
new file mode 100644
index 0000000000..e8f8b97170
--- /dev/null
+++ b/modules/libpref/moz.build
@@ -0,0 +1,174 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+with Files("**"):
+ BUG_COMPONENT = ("Core", "Preferences: Backend")
+
+if CONFIG["ENABLE_TESTS"]:
+ DIRS += ["test/gtest"]
+
+XPCSHELL_TESTS_MANIFESTS += [
+ "test/unit/xpcshell.ini",
+ "test/unit_ipc/xpcshell.ini",
+]
+
+BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
+
+XPIDL_SOURCES += [
+ "nsIPrefBranch.idl",
+ "nsIPrefLocalizedString.idl",
+ "nsIPrefService.idl",
+ "nsIRelativeFilePref.idl",
+]
+
+XPIDL_MODULE = "pref"
+
+pref_groups = [
+ "accessibility",
+ "alerts",
+ "apz",
+ "beacon",
+ "bidi",
+ "browser",
+ "canvas",
+ "channelclassifier",
+ "clipboard",
+ "content",
+ "converter",
+ "cookiebanners",
+ "datareporting",
+ "device",
+ "devtools",
+ "docshell",
+ "dom",
+ "editor",
+ "extensions",
+ "fission",
+ "font",
+ "full_screen_api",
+ "general",
+ "geo",
+ "gfx",
+ "gl",
+ "html5",
+ "idle_period",
+ "image",
+ "intl",
+ "javascript",
+ "layers",
+ "layout",
+ "mathml",
+ "media",
+ "midi",
+ "mousewheel",
+ "mozilla",
+ "network",
+ "nglayout",
+ "page_load",
+ "pdfjs",
+ "permissions",
+ "places",
+ "plain_text",
+ "preferences",
+ "print",
+ "privacy",
+ "prompts",
+ "security",
+ "signon",
+ "slider",
+ "storage",
+ "svg",
+ "telemetry",
+ "test",
+ "threads",
+ "timer",
+ "toolkit",
+ "ui",
+ "urlclassifier",
+ "view_source",
+ "webgl",
+ "widget",
+ "zoom",
+]
+if CONFIG["OS_TARGET"] == "Android":
+ pref_groups += [
+ "android",
+ "consoleservice",
+ ]
+if CONFIG["FUZZING"]:
+ pref_groups += ["fuzzing"]
+pref_groups = tuple(sorted(pref_groups))
+
+# Note: generate_static_pref_list.py relies on StaticPrefListAll.h being first.
+gen_h = ["init/StaticPrefListAll.h"]
+gen_h += ["StaticPrefsAll.h"]
+gen_h += ["init/StaticPrefList_{}.h".format(pg) for pg in pref_groups]
+gen_h += ["StaticPrefs_{}.h".format(pg) for pg in pref_groups]
+
+gen_cpp = ["init/StaticPrefsCGetters.cpp"]
+
+gen_rs = ["static_prefs.rs"]
+
+EXPORTS.mozilla += [
+ "init/StaticPrefListBegin.h",
+ "init/StaticPrefListEnd.h",
+ "nsRelativeFilePref.h",
+ "Preferences.h",
+ "StaticPrefsBase.h",
+]
+EXPORTS.mozilla += sorted(["!" + g for g in gen_h])
+
+UNIFIED_SOURCES += [
+ "Preferences.cpp",
+ "SharedPrefMap.cpp",
+]
+
+gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
+
+GeneratedFile(
+ *gen_all_tuple,
+ script="init/generate_static_pref_list.py",
+ entry_point="emit_code",
+ inputs=["init/StaticPrefList.yaml"]
+)
+
+PYTHON_UNITTEST_MANIFESTS += [
+ "test/python.ini",
+]
+
+XPCOM_MANIFESTS += [
+ "components.conf",
+]
+
+SPHINX_TREES["/modules/libpref"] = "docs"
+
+include("/ipc/chromium/chromium-config.mozbuild")
+
+FINAL_LIBRARY = "xul"
+
+DEFINES["OS_ARCH"] = CONFIG["OS_ARCH"]
+DEFINES["MOZ_WIDGET_TOOLKIT"] = CONFIG["MOZ_WIDGET_TOOLKIT"]
+
+if CONFIG["MOZ_SERVICES_SYNC"]:
+ DEFINES["MOZ_SERVICES_SYNC"] = True
+
+if CONFIG["MOZ_BUILD_APP"] == "browser":
+ DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
+
+if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
+ if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
+ FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [
+ "greprefs.js",
+ ]
+ else:
+ for arch in CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
+ FINAL_TARGET_FILES[arch] += [
+ "!/dist/fat-aar/output/{arch}/greprefs.js".format(arch=arch),
+ ]
+else:
+ FINAL_TARGET_PP_FILES += [
+ "greprefs.js",
+ ]