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/.
|
|
|
|
|
|
|
|
webidl_base := $(topsrcdir)/dom/webidl
|
2012-03-31 08:42:20 +04:00
|
|
|
|
2016-01-15 10:14:58 +03:00
|
|
|
ifdef COMPILE_ENVIRONMENT
|
|
|
|
|
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
|
|
|
# These come from webidlsrcs.mk.
|
2016-05-16 22:43:56 +03:00
|
|
|
# TODO Write directly into backend.mk (bug 1281618)
|
2013-12-12 11:26:38 +04:00
|
|
|
CPPSRCS += $(globalgen_sources) $(unified_binding_cpp_files)
|
2013-02-25 00:36:44 +04:00
|
|
|
|
2012-03-31 08:42:20 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
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)
|
|
|
|
|
2018-04-30 19:52:28 +03:00
|
|
|
export:: webidl.stub
|
|
|
|
|
|
|
|
# codegen.pp is created as a side-effect of the webidl action
|
2017-07-25 18:17:32 +03:00
|
|
|
-include codegen.pp
|
2013-07-15 21:49:42 +04:00
|
|
|
|
2018-04-30 19:52:28 +03:00
|
|
|
webidl.stub: $(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)
|
|
|
|
|
2016-01-15 10:14:58 +03:00
|
|
|
endif
|
|
|
|
|
2012-03-31 08:42:20 +04:00
|
|
|
GARBAGE += \
|
2018-04-30 19:52:28 +03:00
|
|
|
webidl.stub \
|
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)
|