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
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 abs_dist
:= $(abspath
$(DIST
))
6 webidl_base
:= $(topsrcdir
)/dom
/webidl
8 # Generated by moz.build
12 OS_CXXFLAGS
+= -Wno-uninitialized
15 # These come from webidlsrcs.mk.
16 # TODO Write directly into backend.mk.
17 CPPSRCS
+= $(globalgen_sources
) $(unified_binding_cpp_files
)
19 # Generated bindings reference *Binding.h, not mozilla/dom/*Binding.h. And,
20 # since we generate exported bindings directly to $(DIST)/include, we need
21 # to add that path to the search list.
23 # Ideally, binding generation uses the prefixed header file names.
25 LOCAL_INCLUDES
+= -I
$(DIST
)/include/mozilla
/dom
27 include $(topsrcdir
)/config
/rules.mk
29 # TODO This list should be emitted to a .pp file via
30 # GenerateCSS2PropertiesWebIDL.py.
31 css2properties_dependencies
= \
32 $(topsrcdir
)/layout
/style
/nsCSSPropList.h \
33 $(topsrcdir
)/layout
/style
/nsCSSPropAliasList.h \
34 $(webidl_base
)/CSS2Properties.webidl.in \
35 $(webidl_base
)/CSS2PropertiesProps.h \
36 $(srcdir)/GenerateCSS2PropertiesWebIDL.py \
40 CSS2Properties.webidl
: $(css2properties_dependencies
)
41 $(CPP
) $(DEFINES
) $(ACDEFINES
) -I
$(topsrcdir
)/layout
/style \
42 $(webidl_base
)/CSS2PropertiesProps.h | \
43 PYTHONDONTWRITEBYTECODE
=1 $(PYTHON
) \
44 $(srcdir)/GenerateCSS2PropertiesWebIDL.py \
45 $(webidl_base
)/CSS2Properties.webidl.in
> $@
47 # Most of the logic for dependencies lives inside Python so it can be
48 # used by multiple build backends. We simply have rules to generate
49 # and include the .pp file.
51 # The generated .pp file contains all the important dependencies such as
52 # changes to .webidl or .py files should result in code generation being
53 # performed. But we do pull in file-lists.jon to catch file additions.
54 codegen_dependencies
:= \
56 $(nonstatic_webidl_files
) \
60 # The 1 is to make codegen.pp not optional.
61 $(call include_deps
,codegen.pp
,1)
63 codegen.pp
: $(codegen_dependencies
)
64 $(call py_action
,webidl
,$(srcdir))
69 $(call SUBMAKE
,libs
,test)
77 $(wildcard *Binding.
cpp) \
78 $(wildcard *Event.
cpp) \
79 $(wildcard *-event.
cpp) \
80 $(wildcard *.webidl
) \