Bug 1687263: part 4) Defer and in some cases avoid removing spellchecking-ranges...
[gecko.git] / uriloader / exthandler / moz.build
bloba5f1382cef8161c1543174b81ab8ef92f85d717e
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/.
7 SPHINX_TREES["/uriloader/exthandler"] = "docs"
9 TEST_DIRS += ["tests"]
11 XPIDL_SOURCES += [
12     "nsCExternalHandlerService.idl",
13     "nsIContentDispatchChooser.idl",
14     "nsIExternalHelperAppService.idl",
15     "nsIExternalProtocolService.idl",
16     "nsIHandlerService.idl",
17     "nsIHelperAppLauncherDialog.idl",
18     "nsISharingHandlerApp.idl",
21 XPIDL_MODULE = "exthandler"
23 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
24     osdir = "win"
25     LOCAL_INCLUDES += ["win"]
26 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
27     osdir = "mac"
28 elif CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "uikit"):
29     osdir = CONFIG["MOZ_WIDGET_TOOLKIT"]
30 else:
31     osdir = "unix"
33 EXPORTS += [osdir + "/nsOSHelperAppService.h"]
35 EXPORTS += [
36     "ContentHandlerService.h",
37     "nsExternalHelperAppService.h",
38     "nsMIMEInfoChild.h",
39     "nsOSHelperAppServiceChild.h",
42 EXPORTS += [
43     "nsLocalHandlerApp.h",
46 EXPORTS.mozilla.dom += [
47     "ExternalHelperAppChild.h",
48     "ExternalHelperAppParent.h",
51 UNIFIED_SOURCES += [
52     "ContentHandlerService.cpp",
53     "ExternalHelperAppChild.cpp",
54     "ExternalHelperAppParent.cpp",
55     "HandlerServiceParent.cpp",
56     "nsExternalHelperAppService.cpp",
57     "nsExternalProtocolHandler.cpp",
58     "nsLocalHandlerApp.cpp",
59     "nsMIMEInfoImpl.cpp",
60     "nsOSHelperAppServiceChild.cpp",
63 if CONFIG["MOZ_BUILD_APP"] == "browser":
64     DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
66 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
67     UNIFIED_SOURCES += [
68         "mac/nsLocalHandlerAppMac.mm",
69         "mac/nsMIMEInfoMac.mm",
70         "mac/nsOSHelperAppService.mm",
71     ]
72 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
73     UNIFIED_SOURCES += [
74         "uikit/nsLocalHandlerAppUIKit.mm",
75         "uikit/nsMIMEInfoUIKit.mm",
76         "uikit/nsOSHelperAppService.mm",
77     ]
78 else:
79     # These files can't be built in unified mode because they redefine LOG.
80     SOURCES += [
81         osdir + "/nsOSHelperAppService.cpp",
82     ]
83     if CONFIG["CC_TYPE"] in ("clang", "gcc"):
84         CXXFLAGS += ["-Wno-error=shadow"]
86 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
87     UNIFIED_SOURCES += [
88         "unix/nsGNOMERegistry.cpp",
89         "unix/nsMIMEInfoUnix.cpp",
90     ]
91 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
92     UNIFIED_SOURCES += [
93         "android/nsMIMEInfoAndroid.cpp",
94     ]
95 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
96     UNIFIED_SOURCES += [
97         "win/nsMIMEInfoWin.cpp",
98     ]
100 if CONFIG["MOZ_ENABLE_DBUS"]:
101     UNIFIED_SOURCES += [
102         "nsDBusHandlerApp.cpp",
103     ]
104     EXPORTS.mozilla += [
105         "DBusHelpers.h",
106     ]
108 EXTRA_COMPONENTS += [
109     "HandlerService.js",
110     "HandlerService.manifest",
113 EXTRA_JS_MODULES += [
114     "WebHandlerApp.jsm",
117 XPCOM_MANIFESTS += [
118     "components.conf",
121 IPDL_SOURCES += [
122     "PExternalHelperApp.ipdl",
123     "PHandlerService.ipdl",
126 include("/ipc/chromium/chromium-config.mozbuild")
128 FINAL_LIBRARY = "xul"
130 LOCAL_INCLUDES += [
131     "/docshell/base",
132     "/dom/base",
133     "/dom/ipc",
134     "/netwerk/base",
135     "/netwerk/protocol/http",
138 if CONFIG["MOZ_ENABLE_DBUS"]:
139     CXXFLAGS += CONFIG["TK_CFLAGS"]
140     CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
142 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
143     CXXFLAGS += CONFIG["TK_CFLAGS"]
144     CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]