Bug 1279643 - Don't compile interfaces with midl during artifact builds. r=mshal
MozReview-Commit-ID: 8lEF8WTuEzz
--- a/accessible/interfaces/ia2/Makefile.in
+++ b/accessible/interfaces/ia2/Makefile.in
@@ -50,36 +50,40 @@ MIDL_GENERATED_FILES = \
$(MIDL_INTERFACES:%.idl=%_p.c) \
$(MIDL_INTERFACES:%.idl=%_i.c) \
$(MIDL_INTERFACES:%.idl=%.h) \
$(MIDL_ENUMS:%.idl=%.h) \
$(NULL)
EMBED_MANIFEST_AT = 2
-INSTALL_TARGETS += midl
-midl_FILES := $(filter %.h %_i.c,$(MIDL_GENERATED_FILES))
-midl_DEST = $(DIST)/include
-midl_TARGET := export
+ifdef COMPILE_ENVIRONMENT
+ INSTALL_TARGETS += midl
+ midl_FILES := $(filter %.h %_i.c,$(MIDL_GENERATED_FILES))
+ midl_DEST = $(DIST)/include
+ midl_TARGET := export
+endif
include $(topsrcdir)/config/rules.mk
# generate list of to-be-generated files that are missing
# but ignore special file dlldata.c
missing:=$(strip $(foreach onefile,$(strip $(subst dlldata.c,,$(MIDL_GENERATED_FILES))),$(if $(wildcard $(onefile)),,$(onefile))))
missing_base:=$(sort $(basename $(subst _p.c,,$(subst _i.c,,$(missing)))))
+ifdef COMPILE_ENVIRONMENT
$(MIDL_GENERATED_FILES) : midl_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; \
done
touch $@
+endif
# This marshall dll is also registered in the installer
register::
regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)
--- a/accessible/interfaces/msaa/Makefile.in
+++ b/accessible/interfaces/msaa/Makefile.in
@@ -11,40 +11,46 @@ MIDL_GENERATED_FILES = \
ISimpleDOMDocument.h \
ISimpleDOMDocument_p.c \
ISimpleDOMDocument_i.c \
ISimpleDOMText.h \
ISimpleDOMText_p.c \
ISimpleDOMText_i.c \
$(NULL)
+ifdef COMPILE_ENVIRONMENT
$(MIDL_GENERATED_FILES): done_gen
+endif
done_gen: ISimpleDOMNode.idl \
ISimpleDOMDocument.idl \
ISimpleDOMText.idl
$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -Oicf $(srcdir)/ISimpleDOMNode.idl
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMDocument.idl
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMText.idl
touch $@
+ifdef COMPILE_ENVIRONMENT
export:: done_gen
+endif
# This marshall dll is also registered in the installer
register::
regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)
EMBED_MANIFEST_AT = 2
midl_exports := \
ISimpleDOMDocument.h \
ISimpleDOMDocument_i.c \
ISimpleDOMNode.h \
ISimpleDOMNode_i.c \
ISimpleDOMText.h \
ISimpleDOMText_i.c \
$(NULL)
-INSTALL_TARGETS += midl_exports
-midl_exports_FILES := $(midl_exports)
-midl_exports_DEST = $(DIST)/include
-midl_exports_TARGET := export
+ifdef COMPILE_ENVIRONMENT
+ INSTALL_TARGETS += midl_exports
+ midl_exports_FILES := $(midl_exports)
+ midl_exports_DEST = $(DIST)/include
+ midl_exports_TARGET := export
+endif