1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
# You can obtain one at http://mozilla.org/MPL/2.0/.
6
topsrcdir = @top_srcdir@
12
LIBRARY_NAME = dombindings_s
17
include $(topsrcdir)/config/config.mk
19
# Need this to find all our DOM source files.
20
include $(topsrcdir)/dom/dom-config.mk
22
include $(topsrcdir)/dom/webidl/WebIDL.mk
24
binding_include_path := mozilla/dom
25
all_webidl_files = $(webidl_files) $(generated_webidl_files)
26
# Set exported_binding_headers before adding the test IDL to the mix
27
exported_binding_headers := $(subst .webidl,Binding.h,$(all_webidl_files))
28
# Set linked_binding_cpp_files before adding the test IDL to the mix
29
linked_binding_cpp_files := $(subst .webidl,Binding.cpp,$(all_webidl_files))
31
all_webidl_files += $(test_webidl_files)
33
binding_header_files := $(subst .webidl,Binding.h,$(all_webidl_files))
34
binding_cpp_files := $(subst .webidl,Binding.cpp,$(all_webidl_files))
36
globalgen_targets := \
39
RegisterBindings.cpp \
45
$(linked_binding_cpp_files) \
46
$(filter %.cpp, $(globalgen_targets)) \
48
DOMJSProxyHandler.cpp \
51
EXPORTS_NAMESPACES = $(binding_include_path) mozilla
57
EXPORTS_$(binding_include_path) = \
63
PrimitiveConversions.h \
69
$(exported_binding_headers) \
72
LOCAL_INCLUDES += -I$(topsrcdir)/js/xpconnect/src \
73
-I$(topsrcdir)/js/xpconnect/wrappers \
74
-I$(topsrcdir)/content/canvas/src \
75
-I$(topsrcdir)/content/html/content/src
77
include $(topsrcdir)/config/rules.mk
79
# If you change bindinggen_dependencies here, change it in
80
# dom/bindings/test/Makefile.in too.
81
bindinggen_dependencies := \
91
CSS2Properties.webidl: $(topsrcdir)/layout/style/nsCSSPropList.h \
92
$(topsrcdir)/layout/style/nsCSSPropAliasList.h \
93
$(webidl_base)/CSS2Properties.webidl.in \
94
$(webidl_base)/CSS2PropertiesProps.h \
95
$(srcdir)/GenerateCSS2PropertiesWebIDL.py \
97
$(CPP) -I$(topsrcdir)/layout/style $(webidl_base)/CSS2PropertiesProps.h | \
98
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) \
99
$(srcdir)/GenerateCSS2PropertiesWebIDL.py $(webidl_base)/CSS2Properties.webidl.in > CSS2Properties.webidl
101
$(webidl_files): %: $(webidl_base)/%
102
$(INSTALL) $(IFLAGS1) $(webidl_base)/$* .
104
$(test_webidl_files): %: $(srcdir)/test/%
105
$(INSTALL) $(IFLAGS1) $(srcdir)/test/$* .
107
$(binding_header_files): %Binding.h: $(bindinggen_dependencies) \
110
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
111
$(PLY_INCLUDE) -I$(srcdir)/parser \
112
$(srcdir)/BindingGen.py header \
113
$(srcdir)/Bindings.conf $*Binding \
116
$(binding_cpp_files): %Binding.cpp: $(bindinggen_dependencies) \
119
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
120
$(PLY_INCLUDE) -I$(srcdir)/parser \
121
$(srcdir)/BindingGen.py cpp \
122
$(srcdir)/Bindings.conf $*Binding \
125
$(globalgen_targets): ParserResults.pkl
129
globalgen_dependencies := \
140
$(MKDIR) -p $(CACHE_DIR)
143
ParserResults.pkl: $(globalgen_dependencies) \
145
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
146
$(PLY_INCLUDE) -I$(srcdir)/parser \
147
$(srcdir)/GlobalGen.py $(srcdir)/Bindings.conf . \
148
--cachedir=$(CACHE_DIR) \
152
$(binding_header_files) \
153
$(binding_cpp_files) \
154
$(all_webidl_files) \
155
$(globalgen_targets) \
161
# Make sure all binding header files are created during the export stage, so we
162
# don't have issues with .cpp files being compiled before we've generated the
163
# headers they depend on. This is really only needed for the test files, since
164
# the non-test headers are all exported above anyway.
165
export:: $(binding_header_files)