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/.
8 BUG_COMPONENT = ("Core", "DOM: Bindings (WebIDL)")
12 XPIDL_SOURCES += ["nsIScriptError.idl"]
14 XPIDL_MODULE = "dom_bindings"
22 "RootedOwningNonNull.h",
26 EXPORTS.mozilla.dom += [
28 "BindingCallContext.h",
29 "BindingDeclarations.h",
33 "CallbackInterface.h",
35 "DOMExceptionNames.h",
37 "DOMJSProxyHandler.h",
44 "NonRefcountedDOMObject.h",
47 "PrimitiveConversions.h",
50 "RemoteObjectProxy.h",
52 "SimpleGlobalObject.h",
53 "SpiderMonkeyInterface.h",
57 "WebIDLGlobalNameHash.h",
61 # Generated bindings reference *Binding.h, not mozilla/dom/*Binding.h. And,
62 # since we generate exported bindings directly to $(DIST)/include, we need
63 # to add that path to the search list.
65 # Ideally, binding generation uses the prefixed header file names.
68 "!/dist/include/mozilla/dom",
78 "/dom/media/webaudio",
80 "/dom/media/webrtc/common/time_profiling",
81 "/dom/media/webrtc/jsapi",
82 "/dom/media/webrtc/libwebrtcglue",
83 "/dom/media/webrtc/transport",
84 "/dom/media/webspeech/recognition",
91 "/js/xpconnect/wrappers",
97 "/third_party/libwebrtc",
98 "/third_party/libwebrtc/webrtc",
101 LOCAL_INCLUDES += ["/third_party/msgpack/include"]
103 DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True
104 DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
108 "CallbackInterface.cpp",
109 "CallbackObject.cpp",
110 "DOMJSProxyHandler.cpp",
112 "IterableIterator.cpp",
114 "nsScriptErrorWithStack.cpp",
115 "RemoteObjectProxy.cpp",
116 "SimpleGlobalObject.cpp",
118 "WebIDLGlobalNameHash.cpp",
121 # Some tests, including those for for maplike and setlike, require bindings
122 # to be built, which means they must be included in libxul. This breaks the
123 # "no test classes are exported" rule stated in the test/ directory, but it's
124 # the only way this will work. Test classes are only built in debug mode, and
125 # all tests requiring use of them are only run in debug mode.
126 if CONFIG["MOZ_DEBUG"] and CONFIG["ENABLE_TESTS"]:
127 EXPORTS.mozilla.dom += [
128 "test/TestFunctions.h",
129 "test/TestInterfaceIterableDouble.h",
130 "test/TestInterfaceIterableDoubleUnion.h",
131 "test/TestInterfaceIterableSingle.h",
132 "test/TestInterfaceMaplike.h",
133 "test/TestInterfaceMaplikeJSObject.h",
134 "test/TestInterfaceMaplikeObject.h",
135 "test/TestInterfaceSetlike.h",
136 "test/TestInterfaceSetlikeNode.h",
137 "test/WrapperCachedNonISupportsTestInterface.h",
140 "test/TestFunctions.cpp",
141 "test/TestInterfaceIterableDouble.cpp",
142 "test/TestInterfaceIterableDoubleUnion.cpp",
143 "test/TestInterfaceIterableSingle.cpp",
144 "test/TestInterfaceMaplike.cpp",
145 "test/TestInterfaceMaplikeJSObject.cpp",
146 "test/TestInterfaceMaplikeObject.cpp",
147 "test/TestInterfaceSetlike.cpp",
148 "test/TestInterfaceSetlikeNode.cpp",
149 "test/WrapperCachedNonISupportsTestInterface.cpp",
152 include("/ipc/chromium/chromium-config.mozbuild")
154 FINAL_LIBRARY = "xul"
156 SPHINX_TREES["webidl"] = "docs"
158 with Files("docs/**"):
159 SCHEDULES.exclusive = ["docs"]
161 SPHINX_PYTHON_PACKAGE_DIRS += ["mozwebidlcodegen"]
163 with Files("mozwebidlcodegen/**.py"):
164 SCHEDULES.inclusive += ["docs"]
166 if CONFIG["MOZ_BUILD_APP"] in ["browser", "mobile/android", "xulrunner"]:
167 # This is needed for Window.webidl
168 DEFINES["HAVE_SIDEBAR"] = True
171 PYTHON_UNITTEST_MANIFESTS += [
172 "mozwebidlcodegen/test/python.ini",
175 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
176 CXXFLAGS += ["-Wno-error=shadow"]
177 # Suppress warnings in third-party code.
179 "-Wno-maybe-uninitialized",
182 if CONFIG["COMPILE_ENVIRONMENT"]:
184 "CSS2Properties.webidl",
185 script="GenerateCSS2PropertiesWebIDL.py",
186 entry_point="generate",
188 "/dom/webidl/CSS2Properties.webidl.in",
189 "!/layout/style/ServoCSSPropList.py",