Bug 1455799 - Make an explicit webidl export target; r=bz,chmanchester
authorMike Shal <mshal@mozilla.com>
Mon, 30 Apr 2018 12:52:28 -0400
changeset 472478 359cecde7c3ea604dc7f55ae958b9de420924f44
parent 472477 6f975a367b79036dc280c04677b33678aec38af0
child 472479 c36098a8e83f0238196d0bfbaad1f81ae84ae28e
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, chmanchester
bugs1455799, 1378965
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455799 - Make an explicit webidl export target; r=bz,chmanchester By including codegen.pp and having a target for codegen.pp, we were relying on make to build out-of-date include files and re-exec itself after they are built. However, make produces an error if the file does not exist, which is why this include was changed to a -include in bug 1378965. Unfortunately this means that make ignores not only a non-existent file, but also any errors in regenerating the target from the webidl py_action. Instead we can make a separate stub file target for webidl generation, and include the codegen.pp that's generated as a side-effect of the py_action. This way make will fail properly if the webidl generation fails, and there is no error message about a missing codegen.pp on the first build. MozReview-Commit-ID: GjB8zDuMfnL
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -23,29 +23,33 @@ include $(topsrcdir)/config/rules.mk
 # changes to .webidl or .py files should result in code generation being
 # performed. But we do pull in file-lists.jon to catch file additions.
 codegen_dependencies := \
   file-lists.json \
   $(nonstatic_webidl_files) \
+export:: webidl.stub
+# codegen.pp is created as a side-effect of the webidl action
 -include codegen.pp
-codegen.pp: $(codegen_dependencies)
+webidl.stub: $(codegen_dependencies)
 	$(call py_action,webidl,$(srcdir))
 	@$(TOUCH) $@
 .PHONY: compiletests
 	$(call SUBMAKE,libs,test)
+  webidl.stub \
   codegen.pp \
   codegen.json \
   parser.out \
   WebIDLGrammar.pkl \
   $(wildcard *.h) \
   $(wildcard *Binding.cpp) \
   $(wildcard *Event.cpp) \
   $(wildcard *-event.cpp) \
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -585,17 +585,17 @@ def create_build_system_manager(topsrcdi
         os.path.join(dist_dir, 'include', 'mozilla', 'dom'),
         os.path.join(obj_dir, 'codegen.json'),
         # The make rules include a codegen.pp file containing dependencies.
         make_deps_path=os.path.join(obj_dir, 'codegen.pp'),
-        make_deps_target='codegen.pp',
+        make_deps_target='webidl.stub',
 class BuildSystemWebIDL(MozbuildObject):
     def manager(self):
         if not hasattr(self, '_webidl_manager'):
             self._webidl_manager = create_build_system_manager(