Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / bindings / moz.build
blob344355571865a61d49869058216c483e6f146f74
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 with Files("**"):
8     BUG_COMPONENT = ("Core", "DOM: Bindings (WebIDL)")
10 TEST_DIRS += ["test"]
12 XPIDL_SOURCES += ["nsIScriptError.idl"]
14 XPIDL_MODULE = "dom_bindings"
16 EXPORTS.ipc += [
17     "ErrorIPCUtils.h",
20 EXPORTS.mozilla += [
21     "ErrorResult.h",
22     "RootedOwningNonNull.h",
23     "RootedRefPtr.h",
26 EXPORTS.mozilla.dom += [
27     "AtomList.h",
28     "BindingCallContext.h",
29     "BindingDeclarations.h",
30     "BindingIPCUtils.h",
31     "BindingUtils.h",
32     "CallbackFunction.h",
33     "CallbackInterface.h",
34     "CallbackObject.h",
35     "DOMExceptionNames.h",
36     "DOMJSClass.h",
37     "DOMJSProxyHandler.h",
38     "DOMString.h",
39     "Errors.msg",
40     "Exceptions.h",
41     "FakeString.h",
42     "IterableIterator.h",
43     "JSSlots.h",
44     "NonRefcountedDOMObject.h",
45     "Nullable.h",
46     "ObservableArrayProxyHandler.h",
47     "PinnedStringId.h",
48     "PrimitiveConversions.h",
49     "ProxyHandlerUtils.h",
50     "Record.h",
51     "RemoteObjectProxy.h",
52     "RootedDictionary.h",
53     "RootedRecord.h",
54     "RootedSequence.h",
55     "SimpleGlobalObject.h",
56     "SpiderMonkeyInterface.h",
57     "ToJSValue.h",
58     "TypedArray.h",
59     "UnionMember.h",
60     "WebIDLGlobalNameHash.h",
61     "XrayExpandoClass.h",
65 # Generated bindings reference *Binding.h, not mozilla/dom/*Binding.h. And,
66 # since we generate exported bindings directly to $(DIST)/include, we need
67 # to add that path to the search list.
69 # Ideally, binding generation uses the prefixed header file names.
70 # Bug 932082 tracks.
71 LOCAL_INCLUDES += [
72     "!/dist/include/mozilla/dom",
75 LOCAL_INCLUDES += [
76     "/dom/base",
77     "/dom/battery",
78     "/dom/canvas",
79     "/dom/geolocation",
80     "/dom/html",
81     "/dom/indexedDB",
82     "/dom/media/webaudio",
83     "/dom/media/webrtc",
84     "/dom/media/webrtc/common/time_profiling",
85     "/dom/media/webrtc/jsapi",
86     "/dom/media/webrtc/libwebrtcglue",
87     "/dom/media/webrtc/transport",
88     "/dom/media/webspeech/recognition",
89     "/dom/svg",
90     "/dom/xml",
91     "/dom/xslt/base",
92     "/dom/xslt/xpath",
93     "/dom/xul",
94     "/js/xpconnect/src",
95     "/js/xpconnect/wrappers",
96     "/layout/generic",
97     "/layout/style",
98     "/layout/xul/tree",
99     "/media/webrtc/",
100     "/netwerk/base/",
101     "/third_party/libwebrtc",
102     "/third_party/libwebrtc/third_party/abseil-cpp",
105 LOCAL_INCLUDES += ["/third_party/msgpack/include"]
107 DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True
108 DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
110 UNIFIED_SOURCES += [
111     "BindingUtils.cpp",
112     "CallbackInterface.cpp",
113     "CallbackObject.cpp",
114     "DOMJSProxyHandler.cpp",
115     "Exceptions.cpp",
116     "IterableIterator.cpp",
117     "nsScriptError.cpp",
118     "nsScriptErrorWithStack.cpp",
119     "ObservableArrayProxyHandler.cpp",
120     "RemoteObjectProxy.cpp",
121     "SimpleGlobalObject.cpp",
122     "ToJSValue.cpp",
123     "WebIDLGlobalNameHash.cpp",
126 # Some tests, including those for for maplike and setlike, require bindings
127 # to be built, which means they must be included in libxul. This breaks the
128 # "no test classes are exported" rule stated in the test/ directory, but it's
129 # the only way this will work. Test classes are only built in debug mode, and
130 # all tests requiring use of them are only run in debug mode.
131 if CONFIG["MOZ_DEBUG"] and CONFIG["ENABLE_TESTS"]:
132     EXPORTS.mozilla.dom += [
133         "test/TestFunctions.h",
134         "test/TestInterfaceAsyncIterableDouble.h",
135         "test/TestInterfaceAsyncIterableDoubleUnion.h",
136         "test/TestInterfaceAsyncIterableSingle.h",
137         "test/TestInterfaceAsyncIterableSingleWithArgs.h",
138         "test/TestInterfaceIterableDouble.h",
139         "test/TestInterfaceIterableDoubleUnion.h",
140         "test/TestInterfaceIterableSingle.h",
141         "test/TestInterfaceLength.h",
142         "test/TestInterfaceMaplike.h",
143         "test/TestInterfaceMaplikeJSObject.h",
144         "test/TestInterfaceMaplikeObject.h",
145         "test/TestInterfaceObservableArray.h",
146         "test/TestInterfaceSetlike.h",
147         "test/TestInterfaceSetlikeNode.h",
148         "test/TestTrialInterface.h",
149         "test/WrapperCachedNonISupportsTestInterface.h",
150     ]
151     UNIFIED_SOURCES += [
152         "test/TestFunctions.cpp",
153         "test/TestInterfaceAsyncIterableDouble.cpp",
154         "test/TestInterfaceAsyncIterableDoubleUnion.cpp",
155         "test/TestInterfaceAsyncIterableSingle.cpp",
156         "test/TestInterfaceAsyncIterableSingleWithArgs.cpp",
157         "test/TestInterfaceIterableDouble.cpp",
158         "test/TestInterfaceIterableDoubleUnion.cpp",
159         "test/TestInterfaceIterableSingle.cpp",
160         "test/TestInterfaceLength.cpp",
161         "test/TestInterfaceMaplike.cpp",
162         "test/TestInterfaceMaplikeJSObject.cpp",
163         "test/TestInterfaceMaplikeObject.cpp",
164         "test/TestInterfaceObservableArray.cpp",
165         "test/TestInterfaceSetlike.cpp",
166         "test/TestInterfaceSetlikeNode.cpp",
167         "test/TestTrialInterface.cpp",
168         "test/WrapperCachedNonISupportsTestInterface.cpp",
169     ]
171 include("/ipc/chromium/chromium-config.mozbuild")
173 FINAL_LIBRARY = "xul"
175 SPHINX_TREES["webidl"] = "docs"
177 with Files("docs/**"):
178     SCHEDULES.exclusive = ["docs"]
180 SPHINX_PYTHON_PACKAGE_DIRS += ["mozwebidlcodegen"]
182 with Files("mozwebidlcodegen/**.py"):
183     SCHEDULES.inclusive += ["docs"]
186 PYTHON_UNITTEST_MANIFESTS += [
187     "mozwebidlcodegen/test/python.toml",
190 if CONFIG["CC_TYPE"] == "gcc":
191     CXXFLAGS += [
192         "-Wno-maybe-uninitialized",
193     ]
195 if CONFIG["COMPILE_ENVIRONMENT"]:
196     GeneratedFile(
197         "CSS2Properties.webidl",
198         script="GenerateCSS2PropertiesWebIDL.py",
199         entry_point="generate",
200         inputs=[
201             "/dom/webidl/CSS2Properties.webidl.in",
202             "!/layout/style/ServoCSSPropList.py",
203         ],
204     )