7143162: Allow disable building of jdk demos and samples
authormduigou
Mon, 27 Feb 2012 18:10:03 -0800
changeset 11994 74f1488b7347
parent 11993 09fe41b31c03
child 11995 4516e181b149
7143162: Allow disable building of jdk demos and samples Reviewed-by: ohair
jdk/make/Makefile
jdk/make/common/Release.gmk
jdk/make/common/shared/Sanity-Settings.gmk
--- a/jdk/make/Makefile	Mon Feb 27 13:53:25 2012 -0500
+++ b/jdk/make/Makefile	Mon Feb 27 18:10:03 2012 -0800
@@ -197,7 +197,7 @@
 #
 # 'all' target intro
 #
-all:: 
+all::
 	@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M')
 
 # Just in case anyone uses this old name, same as 'build'
@@ -234,7 +234,17 @@
 
 SUBDIRS       = tools java javax sun com
 SUBDIRS_tools = launchers
-SUBDIRS_misc  = org sunw jpda mkdemo mksample
+SUBDIRS_misc  = org sunw jpda
+
+# demos
+ifndef NO_DEMOS
+  SUBDIRS_misc += mkdemo
+endif
+
+# samples
+ifndef NO_SAMPLES
+  SUBDIRS_misc += mksample
+endif
 
 # Alternate classes implementation
 ifndef OPENJDK
@@ -383,4 +393,3 @@
 .PHONY: all build clean clobber optimized debug fastdebug create_links \
 	import import_product import_fastdebug import_debug \
 	test test_run test_start test_clean test_summary
-
--- a/jdk/make/common/Release.gmk	Mon Feb 27 13:53:25 2012 -0500
+++ b/jdk/make/common/Release.gmk	Mon Feb 27 18:10:03 2012 -0800
@@ -234,7 +234,7 @@
 	 $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
 	 trim-image-jre trim-image-jdk \
          identify-image-jre identify-image-jdk \
-	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files 
+	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files
 
 # Don't use these
 image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre
@@ -496,7 +496,7 @@
 $(JDK_IMAGE_DIR)/sample/SAMPLES_LICENSE: $(SHARE_JDK_DOC_SRC)/SAMPLES_LICENSE
 	$(process-doc-file)
 
-# JRE files 
+# JRE files
 $(JRE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
 	$(process-doc-file)
 ifeq ($(PLATFORM), windows)
@@ -1095,8 +1095,12 @@
 	@#
 	@# demo, include
 	@#
+ifndef NO_DEMOS
 	$(CP) -r -f $(DEMODIR) $(JDK_IMAGE_DIR)
+endif
+ifndef NO_SAMPLES
 	$(CP) -r -f $(SAMPLEDIR) $(JDK_IMAGE_DIR)
+endif
 	$(CP) -r $(INCLUDEDIR) $(JDK_IMAGE_DIR)
 	@#
 	@# Swing BeanInfo generation
@@ -1359,4 +1363,3 @@
 
 # Force rule
 FRC:
-
--- a/jdk/make/common/shared/Sanity-Settings.gmk	Mon Feb 27 13:53:25 2012 -0500
+++ b/jdk/make/common/shared/Sanity-Settings.gmk	Mon Feb 27 18:10:03 2012 -0800
@@ -134,6 +134,8 @@
 ALL_SETTINGS+=$(call addOptionalSetting,PEDANTIC)
 ALL_SETTINGS+=$(call addOptionalSetting,DEV_ONLY)
 ALL_SETTINGS+=$(call addOptionalSetting,NO_DOCS)
+ALL_SETTINGS+=$(call addOptionalSetting,NO_DEMOS)
+ALL_SETTINGS+=$(call addOptionalSetting,NO_SAMPLES)
 ALL_SETTINGS+=$(call addOptionalSetting,NO_IMAGES)
 ALL_SETTINGS+=$(call addOptionalSetting,TOOLS_ONLY)
 ALL_SETTINGS+=$(call addOptionalSetting,INSANE)
@@ -263,4 +265,3 @@
   ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JRE_FILE)
   ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_IMAGE)
 endif
-