2012-03-30 21:42:20 -07:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
2013-12-11 23:26:38 -08:00
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
abs_dist := $(abspath $(DIST))
|
|
|
|
webidl_base := $(topsrcdir)/dom/webidl
|
2012-03-30 21:42:20 -07:00
|
|
|
|
2013-09-05 08:20:26 -07:00
|
|
|
# Generated by moz.build
|
|
|
|
include webidlsrcs.mk
|
2012-03-30 21:42:20 -07:00
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
ifdef GNU_CC
|
|
|
|
OS_CXXFLAGS += -Wno-uninitialized
|
2013-05-09 10:05:33 -07:00
|
|
|
endif
|
2012-03-30 21:42:20 -07:00
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
# These come from webidlsrcs.mk.
|
|
|
|
# TODO Write directly into backend.mk.
|
|
|
|
CPPSRCS += $(globalgen_sources) $(unified_binding_cpp_files)
|
2013-02-24 12:36:44 -08:00
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
# Generated bindings reference *Binding.h, not mozilla/dom/*Binding.h. And,
|
|
|
|
# since we generate exported bindings directly to $(DIST)/include, we need
|
|
|
|
# to add that path to the search list.
|
|
|
|
#
|
|
|
|
# Ideally, binding generation uses the prefixed header file names.
|
|
|
|
# Bug 932092 tracks.
|
|
|
|
LOCAL_INCLUDES += -I$(DIST)/include/mozilla/dom
|
2013-08-13 10:51:56 -07:00
|
|
|
|
2013-11-18 13:02:11 -08:00
|
|
|
PYTHON_UNIT_TESTS += $(srcdir)/mozwebidlcodegen/test/test_mozwebidlcodegen.py
|
|
|
|
|
2012-03-30 21:42:20 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
# TODO This list should be emitted to a .pp file via
|
|
|
|
# GenerateCSS2PropertiesWebIDL.py.
|
|
|
|
css2properties_dependencies = \
|
|
|
|
$(topsrcdir)/layout/style/nsCSSPropList.h \
|
|
|
|
$(topsrcdir)/layout/style/nsCSSPropAliasList.h \
|
|
|
|
$(webidl_base)/CSS2Properties.webidl.in \
|
|
|
|
$(webidl_base)/CSS2PropertiesProps.h \
|
|
|
|
$(srcdir)/GenerateCSS2PropertiesWebIDL.py \
|
2012-03-30 21:42:20 -07:00
|
|
|
$(GLOBAL_DEPS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
CSS2Properties.webidl: $(css2properties_dependencies)
|
|
|
|
$(CPP) $(DEFINES) $(ACDEFINES) -I$(topsrcdir)/layout/style \
|
|
|
|
$(webidl_base)/CSS2PropertiesProps.h | \
|
|
|
|
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) \
|
|
|
|
$(srcdir)/GenerateCSS2PropertiesWebIDL.py \
|
|
|
|
$(webidl_base)/CSS2Properties.webidl.in > $@
|
2012-08-23 21:08:09 -07:00
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
# Most of the logic for dependencies lives inside Python so it can be
|
|
|
|
# used by multiple build backends. We simply have rules to generate
|
|
|
|
# and include the .pp file.
|
|
|
|
#
|
|
|
|
# The generated .pp file contains all the important dependencies such as
|
|
|
|
# changes to .webidl or .py files should result in code generation being
|
|
|
|
# performed.
|
|
|
|
codegen_dependencies := \
|
|
|
|
$(nonstatic_webidl_files) \
|
2012-03-30 21:42:20 -07:00
|
|
|
$(GLOBAL_DEPS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
$(call include_deps,codegen.pp)
|
2013-07-15 10:49:42 -07:00
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
codegen.pp: $(codegen_dependencies)
|
|
|
|
$(call py_action,webidl,$(srcdir))
|
2013-05-09 10:05:33 -07:00
|
|
|
@$(TOUCH) $@
|
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
.PHONY: compiletests
|
|
|
|
compiletests:
|
|
|
|
$(call SUBMAKE,libs,test)
|
|
|
|
|
2012-03-30 21:42:20 -07:00
|
|
|
GARBAGE += \
|
2013-12-11 23:26:38 -08:00
|
|
|
codegen.pp \
|
|
|
|
codegen.json \
|
2012-03-30 21:42:20 -07:00
|
|
|
parser.out \
|
2013-12-11 23:26:38 -08:00
|
|
|
WebIDLGrammar.pkl \
|
|
|
|
$(wildcard *.h) \
|
|
|
|
$(wildcard *Binding.cpp) \
|
|
|
|
$(wildcard *Event.cpp) \
|
|
|
|
$(wildcard *-event.cpp) \
|
|
|
|
$(wildcard *.webidl) \
|
2012-03-30 21:42:20 -07:00
|
|
|
$(NULL)
|
2012-06-12 07:22:05 -07:00
|
|
|
|
2013-12-11 23:26:38 -08:00
|
|
|
DIST_GARBAGE += \
|
|
|
|
file-lists.json \
|
|
|
|
$(NULL)
|