make/common/Modules.gmk
changeset 34116 b746e382da18
parent 33045 00f484891bcf
child 35008 ef0cd710989f
child 35024 25bc9069e077
--- a/make/common/Modules.gmk	Mon Nov 23 14:41:54 2015 -0500
+++ b/make/common/Modules.gmk	Tue Nov 24 12:18:24 2015 +0100
@@ -30,6 +30,12 @@
 include SetupJavaCompilers.gmk
 
 ################################################################################
+# Some platforms don't have the serviceability agent
+ifeq ($(INCLUDE_SA), false)
+  MODULES_FILTER += jdk.hotspot.agent
+endif
+
+################################################################################
 # Module list macros
 
 ALL_TOP_SRC_DIRS := \
@@ -43,21 +49,25 @@
     #
 
 # Find all modules with java sources by looking in the source dirs
+# jdk.hotspot.agent currently doesn't comply with source dir policy.
 define FindJavaModules
   $(filter-out $(MODULES_FILTER), $(sort $(notdir \
       $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir \
       $(wildcard $(patsubst %,%/*/share/classes/*, $(ALL_TOP_SRC_DIRS)) \
           $(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS)) \
-          $(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
+          $(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))) \
+      jdk.hotspot.agent)
 endef
 
 # Find all modules with source for the target platform.
+# jdk.hotspot.agent currently doesn't comply with source dir policy.
 define FindAllModules
   $(sort $(filter-out $(MODULES_FILTER) closed demo sample, \
       $(notdir $(patsubst %/,%, $(dir \
       $(wildcard $(patsubst %, %/*/share, $(ALL_TOP_SRC_DIRS)) \
       $(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \
-      $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS))))))))
+      $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS)))))) \
+      jdk.hotspot.agent))
 endef
 
 ################################################################################