accessible midl hax draft
authorTed Mielczarek <ted@mielczarek.org>
Thu, 14 Sep 2017 06:46:34 -0400
changeset 668590 64d1de14b18da52e92d83eab9d8fb737cd0d5a3c
parent 668589 15c81ce4e038c5db7b6eb1682d38144233701531
child 668591 96949eaa5fbda1d6a4fb53ac922d760f6dcb729f
push id81087
push userbmo:ted@mielczarek.org
push dateThu, 21 Sep 2017 20:59:05 +0000
milestone57.0a1
accessible midl hax MozReview-Commit-ID: 8FFgflzVS7l
accessible/interfaces/gecko/Makefile.in
accessible/interfaces/ia2/Makefile.in
accessible/interfaces/msaa/Makefile.in
accessible/ipc/win/handler/Makefile.in
accessible/ipc/win/typelib/Makefile.in
--- a/accessible/interfaces/gecko/Makefile.in
+++ b/accessible/interfaces/gecko/Makefile.in
@@ -10,17 +10,17 @@ MIDL_GENERATED_FILES = \
   IGeckoCustom_p.c \
   IGeckoCustom_i.c \
   IGeckoCustom.tlb \
   $(NULL)
 
 $(MIDL_GENERATED_FILES): done_gen
 
 done_gen: IGeckoCustom.idl
-	"$(MIDL)" $(MIDL_FLAGS) -I $(srcdir_rel) -Oicf $(srcdir_rel)/IGeckoCustom.idl
+	cmd.exe /q /c \"%CD%/$(DEPTH)/build/win32/vcrun.bat $(MIDL) $(MIDL_FLAGS) -I $(srcdir_rel) -Oicf $(srcdir_rel)/IGeckoCustom.idl\"
 	touch $@
 
 export:: done_gen
 
 midl_exports := \
     IGeckoCustom.h \
     IGeckoCustom_i.c \
     $(NULL)
--- a/accessible/interfaces/ia2/Makefile.in
+++ b/accessible/interfaces/ia2/Makefile.in
@@ -1,13 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-IA2DIR        = $(topsrcdir)/other-licenses/ia2
+IA2DIR        = $(srcdir_rel)/$(DEPTH)/other-licenses/ia2
 
 GARBAGE       += $(MIDL_GENERATED_FILES) \
                  $(MIDL_UNUSED_GENERATED_FILES) \
                  midl_done \
                  typelib_done \
                  $(NULL)
 
 # Please keep this list in sync with the moz.build file until the rest of this
@@ -91,23 +91,23 @@ missing_base:=$(sort $(basename $(subst 
 $(MIDL_GENERATED_FILES) : midl_done typelib_done
 
 ifneq ("$(missing)","")
 midl_done : FORCE
 endif
 
 midl_done : $(addprefix $(IA2DIR)/,$(MIDL_INTERFACES) $(MIDL_ENUMS))
 	for idl in $(sort $(subst FORCE,,$?) $(addsuffix .idl,$(addprefix $(IA2DIR)/,$(missing_base)))); do \
-	  $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -Oicf $$idl; \
+	  cmd.exe /q /c \"%CD%/$(DEPTH)/build/win32/vcrun.bat $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -Oicf $$idl\"; \
 	done
 	touch $@
 
 # The intent of this rule is to generate the .tlb file that is referenced in the
 # .rc file for IA2Marshal.dll
-typelib_done : $(addprefix $(srcdir)/,$(MIDL_LIBRARIES))
+typelib_done : $(addprefix $(srcdir_rel)/,$(MIDL_LIBRARIES))
 	for idl in $?; do \
-	  $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -D _MIDL_DECLARE_WIREM_HANDLE -dlldata `basename $$idl .idl`.c -Oicf $$idl; \
+	  cmd.exe /q /c \"%CD%/$(DEPTH)/build/win32/vcrun.bat $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -D _MIDL_DECLARE_WIREM_HANDLE -dlldata `basename $$idl .idl`.c -Oicf $$idl\"; \
 	done
 	touch $@
 
 # This marshall dll is NOT registered in the installer (agreed to by IA2 participants)
 register::
 	regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)
--- a/accessible/interfaces/msaa/Makefile.in
+++ b/accessible/interfaces/msaa/Makefile.in
@@ -14,17 +14,17 @@ MIDL_GENERATED_FILES = \
 
 $(MIDL_GENERATED_FILES): done_gen
 
 done_gen: ISimpleDOM.idl \
           ISimpleDOMNode.idl \
           ISimpleDOMDocument.idl \
           ISimpleDOMText.idl
 
-	$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -robust -Oicf $(srcdir)/ISimpleDOM.idl
+	cmd.exe /q /c \"%CD%/$(DEPTH)/build/win32/vcrun.bat $(MIDL) $(MIDL_FLAGS) -I $(srcdir_rel) -robust -Oicf $(srcdir_rel)/ISimpleDOM.idl\"
 	touch $@
 
 export:: done_gen
 
 # This marshall dll is also registered in the installer
 register::
 	regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)
 
--- a/accessible/ipc/win/handler/Makefile.in
+++ b/accessible/ipc/win/handler/Makefile.in
@@ -1,31 +1,31 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-IA2DIR = $(topsrcdir)/other-licenses/ia2
-MSAADIR = $(topsrcdir)/accessible/interfaces/msaa
+IA2DIR = $(srcdir_rel)/$(DEPTH)/other-licenses/ia2
+MSAADIR = $(srcdir_rel)/$(DEPTH)/accessible/interfaces/msaa
 GARBAGE += $(MIDL_GENERATED_FILES) midl_done
 
 MIDL_GENERATED_FILES = \
   dlldata.c \
   HandlerData.h \
   HandlerData_c.c \
   HandlerData_i.c \
   HandlerData_p.c \
   HandlerData.tlb \
   $(NULL)
 
 export:: $(MIDL_GENERATED_FILES)
 
 $(MIDL_GENERATED_FILES): midl_done
 
 midl_done: HandlerData.acf HandlerData.idl
-	$(MIDL) $(MIDL_FLAGS) $(DEFINES) -I $(topobjdir) -I $(DIST)/include -I $(IA2DIR) -I $(MSAADIR) -Oicf -acf $(srcdir)/HandlerData.acf $(srcdir)/HandlerData.idl
+	cmd.exe /q /c \"%CD%/$(DEPTH)/build/win32/vcrun.bat $(MIDL) $(MIDL_FLAGS) $(DEFINES) -I $(DEPTH) -I $(DIST)/include -I $(IA2DIR) -I $(MSAADIR) -Oicf -acf $(srcdir_rel)/HandlerData.acf $(srcdir_rel)/HandlerData.idl
 	touch $@
 
 INSTALL_TARGETS += midl
 midl_FILES := HandlerData.h \
               HandlerData_i.c \
               $(NULL)
 midl_DEST := $(DIST)/include
 midl_TARGET := midl
--- a/accessible/ipc/win/typelib/Makefile.in
+++ b/accessible/ipc/win/typelib/Makefile.in
@@ -9,17 +9,17 @@ MIDL_GENERATED_FILES = \
   Accessible_i.c \
   Accessible_p.c \
   Accessible.tlb \
   $(NULL)
 
 $(MIDL_GENERATED_FILES): done_gen
 
 done_gen: Accessible.idl
-	$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/Accessible.idl
+	cmd.exe /q /c \"%CD%/$(DEPTH)/build/win32/vcrun.bat $(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir_rel)/Accessible.idl\"
 	touch $@
 
 export:: done_gen
 
 midl_exports := \
   Accessible.tlb \
   $(NULL)