2012-03-31 08:42:20 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
2013-12-12 11:26:38 +04: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-31 08:42:20 +04:00
|
|
|
|
2013-09-05 19:20:26 +04:00
|
|
|
# Generated by moz.build
|
|
|
|
include webidlsrcs.mk
|
2012-03-31 08:42:20 +04:00
|
|
|
|
2013-12-12 11:26:38 +04:00
|
|
|
ifdef GNU_CC
|
|
|
|
OS_CXXFLAGS += -Wno-uninitialized
|
2013-05-09 21:05:33 +04:00
|
|
|
endif
|
2012-03-31 08:42:20 +04:00
|
|
|
|
2013-12-12 11:26:38 +04:00
|
|
|
# These come from webidlsrcs.mk.
|
|
|
|
# TODO Write directly into backend.mk.
|
|
|
|
CPPSRCS += $(globalgen_sources) $(unified_binding_cpp_files)
|
2013-02-25 00:36:44 +04:00
|
|
|
|
2013-12-12 11:26:38 +04: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 21:51:56 +04:00
|
|
|
|
2013-11-19 01:02:11 +04:00
|
|
|
PYTHON_UNIT_TESTS += $(srcdir)/mozwebidlcodegen/test/test_mozwebidlcodegen.py
|
|
|
|
|
2012-03-31 08:42:20 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2013-12-12 11:26:38 +04: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-31 08:42:20 +04:00
|
|
|
$(GLOBAL_DEPS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-12-12 11:26:38 +04: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-24 08:08:09 +04:00
|
|
|
|
2013-12-12 11:26:38 +04: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
|
2014-03-17 23:41:42 +04:00
|
|
|
# performed. But we do pull in file-lists.jon to catch file additions.
|
2013-12-12 11:26:38 +04:00
|
|
|
codegen_dependencies := \
|
2014-03-17 23:41:42 +04:00
|
|
|
file-lists.json \
|
2013-12-12 11:26:38 +04:00
|
|
|
$(nonstatic_webidl_files) \
|
2012-03-31 08:42:20 +04:00
|
|
|
$(GLOBAL_DEPS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-12-17 01:15:37 +04:00
|
|
|
# The 1 is to make codegen.pp not optional.
|
|
|
|
$(call include_deps,codegen.pp,1)
|
2013-07-15 21:49:42 +04:00
|
|
|
|
2013-12-17 01:15:37 +04:00
|
|
|
codegen.pp: $(codegen_dependencies)
|
2013-12-12 11:26:38 +04:00
|
|
|
$(call py_action,webidl,$(srcdir))
|
2013-05-09 21:05:33 +04:00
|
|
|
@$(TOUCH) $@
|
|
|
|
|
2013-12-12 11:26:38 +04:00
|
|
|
.PHONY: compiletests
|
|
|
|
compiletests:
|
|
|
|
$(call SUBMAKE,libs,test)
|
|
|
|
|
2012-03-31 08:42:20 +04:00
|
|
|
GARBAGE += \
|
2013-12-12 11:26:38 +04:00
|
|
|
codegen.pp \
|
|
|
|
codegen.json \
|
2012-03-31 08:42:20 +04:00
|
|
|
parser.out \
|
2013-12-12 11:26:38 +04:00
|
|
|
WebIDLGrammar.pkl \
|
|
|
|
$(wildcard *.h) \
|
|
|
|
$(wildcard *Binding.cpp) \
|
|
|
|
$(wildcard *Event.cpp) \
|
|
|
|
$(wildcard *-event.cpp) \
|
|
|
|
$(wildcard *.webidl) \
|
2012-03-31 08:42:20 +04:00
|
|
|
$(NULL)
|
2012-06-12 18:22:05 +04:00
|
|
|
|
2013-12-12 11:26:38 +04:00
|
|
|
DIST_GARBAGE += \
|
|
|
|
file-lists.json \
|
|
|
|
$(NULL)
|