diff --git a/Makefile b/Makefile index 1e574940964..6827fd615f3 100644 --- a/Makefile +++ b/Makefile @@ -136,10 +136,12 @@ help: $(info . make docs # Create all docs) $(info . make docs-javadoc # Create just javadocs, depends on less than full docs) $(info . make profiles # Create complete j2re compact profile images) - $(info . make bootcycle-images # Build images twice, second time with newly build JDK) + $(info . make bootcycle-images # Build images twice, second time with newly built JDK) $(info . make install # Install the generated images locally) $(info . make clean # Remove all files generated by make, but not those) - $(info . # generated by configure) + $(info . # generated by configure. Do not run clean and other) + $(info . # targets together as that might behave in an) + $(info . # unexpected way.) $(info . make dist-clean # Remove all files, including configuration) $(info . make help # Give some help on using make) $(info . make test # Run tests, default is all tests (see TEST below)) diff --git a/make/Main.gmk b/make/Main.gmk index aee0061a2b3..65d30bd279d 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -461,6 +461,9 @@ ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \ $(GENDATA_MODULES) $(LIB_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES)) exploded-image: $(ALL_MODULE_TARGETS) modules-xml +# The old 'jdk' target most closely matches the new exploded-image. Keep an +# alias for ease of use. +jdk: exploded-image jars: main-jars nashorn-jar security-jars policy-jars @@ -472,7 +475,7 @@ profiles: $(ALL_PROFILES) docs: docs-javadoc docs-jvmtidoc ALL_TARGETS += gensrc gendata copy java rmic libs launchers \ - $(ALL_MODULE_TARGETS) exploded-image jars \ + $(ALL_MODULE_TARGETS) exploded-image jdk jars \ $(ALL_PROFILES) profiles docs ################################################################################ @@ -492,6 +495,12 @@ ALL_TARGETS += default all # If running a clean target, disable parallel execution ifneq ($(findstring clean, $(MAKECMDGOALS)), ) .NOTPARALLEL: + # It's not recommended to run additional targets to clean on the same make + # command line. Try to detect this and issue a warning. + ifneq ($(filter-out clean%, $(MAKECMDGOALS)), ) + $(warning Mixing clean targets with normal build targets will not work well \ + and is not recommended.) + endif endif CLEAN_COMPONENTS += langtools corba hotspot jdk nashorn images \