Fix newly-namespaced includes
authorBen Turner <bent.mozilla@gmail.com>
Wed, 25 Jan 2012 03:50:19 -0800
changeset 85120 d5a9a1085f71e7e1e2a0b451a373d18c0cccac45
parent 85119 584c48952a64eb320fe7d87ae3d83457a251e2dd
child 85121 48f5c6165e85a4c19f6b1afb1b11138963bbf4ed
push id24
push userbturner@mozilla.com
push dateWed, 25 Jan 2012 11:52:00 +0000
milestone12.0a1
Fix newly-namespaced includes
dom/bindings/BindingGen.py
dom/bindings/DOMJSClass.h
dom/bindings/Makefile.in
--- a/dom/bindings/BindingGen.py
+++ b/dom/bindings/BindingGen.py
@@ -11,17 +11,17 @@ def generate_binding_header(protoList, o
     f = open(filename, 'w')
 
     prologue = """
 /* THIS FILE IS AUTO-GENERATED - DO NOT EDIT */
 
 #ifndef %s_h
 #define %s_h
 
-#include "DOMJSClass.h"
+#include "mozilla/dom/bindings/DOMJSClass.h"
 
 namespace mozilla {
 namespace dom {
 namespace bindings {
 namespace prototypes {
 """ % (outputprefix, outputprefix)
 
     chunk = """
--- a/dom/bindings/DOMJSClass.h
+++ b/dom/bindings/DOMJSClass.h
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bindings_DOMJSClass_h
 #define mozilla_dom_bindings_DOMJSClass_h
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 
-#include "PrototypeList.h" // auto-generated
+#include "mozilla/dom/bindings/PrototypeList.h" // auto-generated
 
 #define DOM_OBJECT_SLOT 0
 
 namespace mozilla {
 namespace dom {
 namespace bindings {
 
 /*
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -23,19 +23,21 @@ WEBIDL_FILES = \
 
 BINDING_HEADER_FILES = $(subst .webidl,Binding.h,$(WEBIDL_FILES))
 BINDING_CPP_FILES = $(subst .webidl,Binding.cpp,$(WEBIDL_FILES))
 
 CPPSRCS = \
   $(BINDING_CPP_FILES) \
   $(NULL)
 
-EXPORTS_NAMESPACES = mozilla/dom/bindings
+bindingsIncludePath := mozilla/dom/bindings
 
-EXPORTS_mozilla/dom/bindings = \
+EXPORTS_NAMESPACES = $(bindingsIncludePath)
+
+EXPORTS_$(bindingsIncludePath) = \
   DOMJSClass.h \
   Utils.h \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 $(BINDING_CPP_FILES): %Binding.cpp: BindingGen.py \
                       PrototypeList.h \
@@ -57,16 +59,17 @@ include $(topsrcdir)/config/rules.mk
 # out of date.
 #
 # We solve this problem by using a dummy file (.GlobalPhaseIndicator) for the
 # dependencies, and generating PrototypeList.h as a side effect. We're
 # essentially lying to make here, which could get us in trouble with build
 # parallelism. To avoid this, we do the global phase during the |export| make
 # phase, so that it's guaranteed to happen first even with parallelism.
 export:: .GlobalPhaseIndicator
+	$(NSINSTALL) PrototypeList.h $(DIST)/include/$(bindingsIncludePath)
 
 GLOBAL_PHASE_TARGETS = \
   PrototypeList.h \
   .GlobalPhaseIndicator \
   $(NULL)
 .GlobalPhaseIndicator: GlobalGen.py \
                        $(addprefix $(WEBIDL_BASE)/, $(WEBIDL_FILES))
 	$(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(topsrcdir)/other-licenses/ply \