From: Mike Hommey <mh@glandium.org>
Date: Wed, 27 Jan 2010 17:47:57 +0100
Subject: Gross workaround to avoid installing test idl and include files in the SDK

https://bugzilla.mozilla.org/show_bug.cgi?id=542749
---
 config/rules.mk        |    8 ++++++++
 js/src/config/rules.mk |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/config/rules.mk b/config/rules.mk
index 5bae201..443383b 100644
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -54,6 +54,14 @@ ifndef INCLUDED_VERSION_MK
 include $(topsrcdir)/config/version.mk
 endif
 
+ifneq (,$(findstring sample,$(MODULE))$(findstring test,$(MODULE))$(findstring Test,$(MODULE)))
+PUBLIC := $(DIST)/tests/include
+IDL_DIR := $(DIST)/tests/idl
+LOCAL_INCLUDES += -I$(XPIDL_GEN_DIR)
+override MOZ_JAVAXPCOM :=
+XPIDL_FLAGS += -I$(DIST)/idl
+endif
+
 REPORT_BUILD = @echo $(notdir $<)
 
 ifeq ($(OS_ARCH),OS2)
diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk
index 5bae201..443383b 100644
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -54,6 +54,14 @@ ifndef INCLUDED_VERSION_MK
 include $(topsrcdir)/config/version.mk
 endif
 
+ifneq (,$(findstring sample,$(MODULE))$(findstring test,$(MODULE))$(findstring Test,$(MODULE)))
+PUBLIC := $(DIST)/tests/include
+IDL_DIR := $(DIST)/tests/idl
+LOCAL_INCLUDES += -I$(XPIDL_GEN_DIR)
+override MOZ_JAVAXPCOM :=
+XPIDL_FLAGS += -I$(DIST)/idl
+endif
+
 REPORT_BUILD = @echo $(notdir $<)
 
 ifeq ($(OS_ARCH),OS2)
