8071767: Improve names and dependencies for image targets
authorihse
Fri, 06 Feb 2015 12:46:59 +0100
changeset 28811 65cf1b4087cf
parent 28810 86666ec06518
child 28812 6c36bc1ccc0e
child 28908 fc8fe39b34cf
8071767: Improve names and dependencies for image targets Reviewed-by: ihse, erikj, dholmes Contributed-by: ingemar.aberg@oracle.com, magnus.ihse.bursie@oracle.com
make/Main.gmk
--- a/make/Main.gmk	Fri Feb 06 12:37:31 2015 +0100
+++ b/make/Main.gmk	Fri Feb 06 12:46:59 2015 +0100
@@ -212,7 +212,7 @@
 	@$(RM) $@
 	@$(call GetSourceTips)
 
-BOOTCYCLE_TARGET := images
+BOOTCYCLE_TARGET := product-images
 bootcycle-images:
 	@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
 	+$(MAKE) $(MAKE_ARGS) -f Main.gmk SPEC=$(dir $(SPEC))bootcycle-spec.gmk $(BOOTCYCLE_TARGET)
@@ -443,31 +443,45 @@
 ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
     $(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
 
+# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
 exploded-image: $(ALL_MODULE_TARGETS)
-# The old 'jdk' target most closely matches the new exploded-image. Keep an
-# alias for ease of use.
-jdk: exploded-image
+
+# The $(BUILD_OUTPUT)/images directory contain the resulting deliverables, 
+# and in line with this, our targets for creating these are named *-image[s].
 
-images: test-image jimages demos samples zip-security verify-modules
+# This target builds the product images, e.g. the JRE and JDK image
+# (and possibly other, more specific versions)
+product-images: jimages demos samples zip-security verify-modules
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-  images: mac-bundles
+  product-images: mac-bundles
 endif
 
-docs: docs-javadoc docs-jvmtidoc
+# This target builds the documentation image
+docs-image: docs-javadoc docs-jvmtidoc
 
+# This target builds the test image
 test-image: prepare-test-image
 
+# all-images is the top-most target, it builds all our deliverables ("images").
+all-images: product-images test-image docs-image
+
 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
-    jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image jdk images \
-    docs test-image
+    jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image \
+    product-images docs-image test-image all-images
 
 ################################################################################
 
-all: images
+# Traditional targets typically run by users.
+# These can be considered aliases for the targets now named by a more
+# "modern" naming scheme.
 default: exploded-image
+jdk: exploded-image
+images: product-images
+docs: docs-image
+all: all-images
 
-ALL_TARGETS += default all
+ALL_TARGETS += default jdk images docs all
 
 ################################################################################
 ################################################################################