tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (3992B)


      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/.
      6 
      7 with Files("**"):
      8     BUG_COMPONENT = ("Core", "Preferences: Backend")
      9 
     10 TEST_DIRS += ["test/gtest"]
     11 
     12 XPCSHELL_TESTS_MANIFESTS += [
     13     "test/unit/xpcshell.toml",
     14     "test/unit_ipc/xpcshell.toml",
     15 ]
     16 
     17 BROWSER_CHROME_MANIFESTS += ["test/browser/browser.toml"]
     18 
     19 XPIDL_SOURCES += [
     20     "nsIPrefBranch.idl",
     21     "nsIPrefLocalizedString.idl",
     22     "nsIPrefOverrideMap.idl",
     23     "nsIPrefService.idl",
     24     "nsIRelativeFilePref.idl",
     25 ]
     26 
     27 XPIDL_MODULE = "pref"
     28 
     29 pref_groups = [
     30     "accessibility",
     31     "alerts",
     32     "apz",
     33     "beacon",
     34     "bidi",
     35     "browser",
     36     "channelclassifier",
     37     "clipboard",
     38     "content",
     39     "converter",
     40     "cookiebanners",
     41     "datareporting",
     42     "device",
     43     "devtools",
     44     "docshell",
     45     "dom",
     46     "editor",
     47     "extensions",
     48     "fission",
     49     "font",
     50     "full_screen_api",
     51     "general",
     52     "geo",
     53     "gfx",
     54     "gl",
     55     "html5",
     56     "idle_period",
     57     "image",
     58     "intl",
     59     "javascript",
     60     "layers",
     61     "layout",
     62     "logging",
     63     "mathml",
     64     "media",
     65     "memory",
     66     "middlemouse",
     67     "midi",
     68     "mousewheel",
     69     "mozilla",
     70     "network",
     71     "nglayout",
     72     "page_load",
     73     "pdfjs",
     74     "permissions",
     75     "places",
     76     "plain_text",
     77     "preferences",
     78     "print",
     79     "privacy",
     80     "prompts",
     81     "security",
     82     "signon",
     83     "slider",
     84     "storage",
     85     "svg",
     86     "telemetry",
     87     "test",
     88     "threads",
     89     "timer",
     90     "toolkit",
     91     "ui",
     92     "urlclassifier",
     93     "view_source",
     94     "webgl",
     95     "widget",
     96     "zoom",
     97 ]
     98 if CONFIG["OS_TARGET"] == "Android":
     99     pref_groups += [
    100         "android",
    101         "consoleservice",
    102     ]
    103 if CONFIG["FUZZING"]:
    104     pref_groups += ["fuzzing"]
    105 if CONFIG["MOZ_THUNDERBIRD"]:
    106     pref_groups += [
    107         "mail",
    108         "mailnews",
    109     ]
    110 pref_groups = tuple(sorted(pref_groups))
    111 
    112 # Note: generate_static_pref_list.py relies on StaticPrefListAll.h being first.
    113 gen_h = ["init/StaticPrefListAll.h"]
    114 gen_h += ["StaticPrefsAll.h"]
    115 gen_h += ["init/StaticPrefList_{}.h".format(pg) for pg in pref_groups]
    116 gen_h += ["StaticPrefs_{}.h".format(pg) for pg in pref_groups]
    117 
    118 gen_cpp = ["init/StaticPrefsCGetters.cpp"]
    119 
    120 gen_rs = ["static_prefs.rs"]
    121 
    122 EXPORTS.mozilla += [
    123     "init/StaticPrefListBegin.h",
    124     "init/StaticPrefListEnd.h",
    125     "nsRelativeFilePref.h",
    126     "Preferences.h",
    127     "StaticPrefsBase.h",
    128 ]
    129 EXPORTS.mozilla += sorted(["!" + g for g in gen_h])
    130 
    131 UNIFIED_SOURCES += [
    132     "Preferences.cpp",
    133     "SharedPrefMap.cpp",
    134 ]
    135 
    136 gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
    137 
    138 gen_inputs = ["init/StaticPrefList.yaml"]
    139 if CONFIG["MOZ_THUNDERBIRD"]:
    140     gen_inputs += ["/comm/mail/app/StaticPrefList.yaml"]
    141 GeneratedFile(
    142     *gen_all_tuple,
    143     script="init/generate_static_pref_list.py",
    144     entry_point="emit_code",
    145     inputs=gen_inputs
    146 )
    147 
    148 PYTHON_UNITTEST_MANIFESTS += [
    149     "test/python.toml",
    150 ]
    151 
    152 XPCOM_MANIFESTS += [
    153     "components.conf",
    154 ]
    155 
    156 SPHINX_TREES["/modules/libpref"] = "docs"
    157 
    158 include("/ipc/chromium/chromium-config.mozbuild")
    159 
    160 FINAL_LIBRARY = "xul"
    161 
    162 DEFINES["OS_ARCH"] = CONFIG["OS_ARCH"]
    163 DEFINES["MOZ_WIDGET_TOOLKIT"] = CONFIG["MOZ_WIDGET_TOOLKIT"]
    164 
    165 if CONFIG["MOZ_SERVICES_SYNC"]:
    166     DEFINES["MOZ_SERVICES_SYNC"] = True
    167 
    168 if CONFIG["MOZ_WEBEXT_WEBIDL_ENABLED"]:
    169     DEFINES["MOZ_WEBEXT_WEBIDL_ENABLED"] = True
    170 
    171 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
    172     if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
    173         FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [
    174             "greprefs.js",
    175         ]
    176     else:
    177         for arch in CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
    178             FINAL_TARGET_FILES[arch] += [
    179                 "!/dist/fat-aar/output/{arch}/greprefs.js".format(arch=arch),
    180             ]
    181 else:
    182     FINAL_TARGET_PP_FILES += [
    183         "greprefs.js",
    184     ]