Bug 890744 - Ensure updated WebIDL headers are installed after regen; r=glandium
authorGregory Szorc <gps@mozilla.com>
Tue, 13 Aug 2013 10:51:56 -0700
changeset 142431 2ebb897ea9e01a788ef1a924a79f4277326513df
parent 142430 419d5fb1dedeef504a919a80cb433d9b4d8ed19f
child 142432 5a9443a00d476348b776991dd6311dc7a9fe2fe6
push id32408
push usergszorc@mozilla.com
push dateTue, 13 Aug 2013 17:53:27 +0000
treeherdermozilla-inbound@2ebb897ea9e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs890744
milestone26.0a1
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 890744 - Ensure updated WebIDL headers are installed after regen; r=glandium
dom/bindings/Makefile.in
dom/bindings/moz.build
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -107,16 +107,29 @@ EXPORTS_GENERATED_FILES := $(exported_bi
 EXPORTS_GENERATED_DEST := $(DIST)/include/$(binding_include_path)
 EXPORTS_GENERATED_TARGET := export
 INSTALL_TARGETS += EXPORTS_GENERATED
 
 ifdef GNU_CC
 CXXFLAGS += -Wno-uninitialized
 endif
 
+# Install auto-generated GlobalGen files. The rules for the install must
+# be in the same target/subtier as GlobalGen.py, otherwise the files will not
+# get installed into the appropriate location as they are generated.
+globalgen_headers_FILES := \
+  PrototypeList.h \
+  RegisterBindings.h \
+  UnionConversions.h \
+  UnionTypes.h \
+  $(NULL)
+globalgen_headers_DEST = $(DIST)/include/mozilla/dom
+globalgen_headers_TARGET := webidl
+INSTALL_TARGETS += globalgen_headers
+
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 # If you change bindinggen_dependencies here, change it in
 # dom/bindings/test/Makefile.in too.
 bindinggen_dependencies := \
   BindingGen.py \
   Bindings.conf \
@@ -194,32 +207,36 @@ globalgen_dependencies := \
   $(NULL)
 
 $(CACHE_DIR)/.done:
 	$(MKDIR) -p $(CACHE_DIR)
 	@$(TOUCH) $@
 
 # Running GlobalGen.py updates ParserResults.pkl as a side-effect
 ParserResults.pkl: $(globalgen_dependencies)
+	$(info Generating global WebIDL files)
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) -I$(srcdir)/parser \
 	  $(srcdir)/GlobalGen.py $(srcdir)/Bindings.conf . \
 	  --cachedir=$(CACHE_DIR) \
 	  $(all_webidl_files)
 
+$(globalgen_headers_FILES): ParserResults.pkl
+
 # Make sure .deps actually exists, since we'll try to write to it from
 # BindingGen.py but we're typically running in the export phase, which is
 # before anyone has bothered creating .deps.
 # Then, pass our long lists through files to try to avoid blowing out the
 # command line.
 # Next, BindingGen.py will examine the changed dependency list to figure out
 # what it really needs to regenerate.
 # Finally, touch the .BindingGen file so that we don't have to keep redoing
 # all that until something else actually changes.
 .BindingGen: $(bindinggen_dependencies) $(binding_dependency_trackers)
+	$(info Generating WebIDL bindings)
 	$(MKDIR) -p .deps
 	echo $(all_webidl_files) > .all-webidl-file-list
 	echo $? > .changed-dependency-list
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) -I$(srcdir)/parser \
 	  $(srcdir)/BindingGen.py \
 	  $(srcdir)/Bindings.conf \
 	  $(CURDIR) \
@@ -238,17 +255,17 @@ GARBAGE += \
   $(binding_dependency_trackers) \
   $(NULL)
 
 # Make sure all binding header files are created during the export stage, so we
 # don't have issues with .cpp files being compiled before we've generated the
 # headers they depend on.  This is really only needed for the test files, since
 # the non-test headers are all exported above anyway.  Note that this means that
 # we do all of our codegen during export.
-webidl: $(binding_header_files)
+webidl:: $(binding_header_files)
 
 .PHONY: webidl
 
 distclean::
 	-$(RM) \
         $(binding_header_files) \
         $(binding_cpp_files) \
         $(all_webidl_files) \
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -17,14 +17,10 @@ EXPORTS.mozilla.dom += [
     'CallbackInterface.h',
     'CallbackObject.h',
     'DOMJSClass.h',
     'DOMJSProxyHandler.h',
     'Errors.msg',
     'NonRefcountedDOMObject.h',
     'Nullable.h',
     'PrimitiveConversions.h',
-    'PrototypeList.h',
-    'RegisterBindings.h',
     'TypedArray.h',
-    'UnionConversions.h',
-    'UnionTypes.h',
 ]