summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/moz.build
blob: 5b884b49368be791679e98ee73f1327f1d294a0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# -*- 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/.

SPHINX_TREES["addon-manager"] = "docs"

with Files("docs/**"):
    SCHEDULES.exclusive = ["docs"]

if CONFIG["MOZ_BUILD_APP"] == "browser":
    DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True

if CONFIG["MOZ_BUILD_APP"] == "mobile/android":
    DEFINES["MOZ_FENNEC"] = True

DIRS += [
    "internal",
]
TEST_DIRS += ["test"]

XPIDL_SOURCES += [
    "amIAddonManagerStartup.idl",
    "amIWebInstallPrompt.idl",
]

XPIDL_MODULE = "extensions"

built_in_addons = "built_in_addons.json"
GENERATED_FILES += [built_in_addons]
manifest = GENERATED_FILES[built_in_addons]
manifest.script = "gen_built_in_addons.py"

if CONFIG["MOZ_BUILD_APP"] == "browser":
    manifest.flags = ["--features=browser/features"]

    FINAL_TARGET_FILES.browser.chrome.browser.content.browser += [
        "!%s" % built_in_addons,
    ]
elif CONFIG["MOZ_BUILD_APP"] == "mobile/android":
    manifest.flags = ["--features=features"]

    FINAL_TARGET_FILES.chrome.chrome.content += [
        "!%s" % built_in_addons,
    ]
elif CONFIG["MOZ_BUILD_APP"] == "comm/mail":
    manifest.flags = ["--features=features"]

    FINAL_TARGET_FILES.chrome.browser.content += [
        "!%s" % built_in_addons,
    ]

EXTRA_PP_COMPONENTS += [
    "extensions.manifest",
]

EXTRA_JS_MODULES += [
    "AbuseReporter.sys.mjs",
    "AddonManager.sys.mjs",
    "amContentHandler.sys.mjs",
    "amInstallTrigger.sys.mjs",
    "amManager.sys.mjs",
    "amWebAPI.sys.mjs",
    "Blocklist.sys.mjs",
    "LightweightThemeManager.sys.mjs",
]

JAR_MANIFESTS += ["jar.mn"]

EXPORTS.mozilla += [
    "AddonContentPolicy.h",
    "AddonManagerStartup.h",
    "AddonManagerWebAPI.h",
]

UNIFIED_SOURCES += [
    "AddonContentPolicy.cpp",
    "AddonManagerStartup.cpp",
    "AddonManagerWebAPI.cpp",
]

XPCOM_MANIFESTS += [
    "components.conf",
]

LOCAL_INCLUDES += [
    "/chrome",
    "/dom/base",
]

FINAL_LIBRARY = "xul"

with Files("**"):
    BUG_COMPONENT = ("Toolkit", "Add-ons Manager")

with Files("Blocklist.sys.mjs"):
    BUG_COMPONENT = ("Toolkit", "Blocklist Implementation")

with Files("content/blocklist**"):
    BUG_COMPONENT = ("Toolkit", "Blocklist Implementation")