diff --git a/make/Images.gmk b/make/Images.gmk index 261017aa22b..7653421d590 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -435,7 +435,7 @@ JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip # directories will always trigger the rule for recompile since # _the.list_of_packages files are touched. ifneq ($(findstring images, $(MAKECMDGOALS)), ) - $(JDK_IMAGE_DIR)/demo/%: $(SUPPORT_OUTPUTDIR)/demo/image/% + $(JDK_IMAGE_DIR)/demo/%: $(SUPPORT_OUTPUTDIR)/demos/image/% if [ ! -d "$@" ]; then \ $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ $(MKDIR) -p $(@D); \ @@ -443,9 +443,9 @@ ifneq ($(findstring images, $(MAKECMDGOALS)), ) fi # Find all files including directories - JDK_DEMO_TARGETS := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demo/image), \ - $(patsubst $(SUPPORT_OUTPUTDIR)/demo/image/%, $(JDK_IMAGE_DIR)/demo/%, \ - $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demo/image \ + JDK_DEMO_TARGETS := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \ + $(patsubst $(SUPPORT_OUTPUTDIR)/demos/image/%, $(JDK_IMAGE_DIR)/demo/%, \ + $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ ! \( -name "_the*" -o -name "javac_state" \) ))) JDK_TARGETS += $(JDK_DEMO_TARGETS) diff --git a/make/Main.gmk b/make/Main.gmk index 28ef3735835..6446c1b7712 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -560,6 +560,8 @@ ALL_TARGETS += default jdk images docs all CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \ images make-support test-make bundles CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS)) +CLEAN_SUPPORT_DIRS += demos +CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS)) CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS)) CLEAN_PHASES := gensrc java native include docs @@ -577,6 +579,9 @@ clean: $(CLEAN_DIR_TARGETS) $(CLEAN_DIR_TARGETS): $(call CleanDir,$(patsubst clean-%, %, $@)) +$(CLEAN_SUPPORT_DIR_TARGETS): + $(call CleanSupportDir,$(patsubst clean-%, %, $@)) + $(CLEAN_TEST_TARGETS): $(call CleanTest,$(patsubst clean-test-%, %, $@)) @@ -610,8 +615,9 @@ dist-clean: clean ) $(ECHO) Cleaned everything, you will have to re-run configure. -ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_TEST_TARGETS) \ - $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS) +ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \ + $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \ + $(CLEAN_MODULE_PHASE_TARGETS) ################################################################################ # Declare *-only targets for each normal target diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk index 29c212a5c9d..db72ef30bc6 100644 --- a/make/MainSupport.gmk +++ b/make/MainSupport.gmk @@ -46,6 +46,13 @@ define CleanDir @$(PRINTF) " done\n" endef +define CleanSupportDir + @$(PRINTF) "Cleaning $(strip $1) build artifacts ..." + @$(PRINTF) "\n" $(LOG_DEBUG) + $(RM) -r $(SUPPORT_OUTPUTDIR)/$(strip $1) + @$(PRINTF) " done\n" +endef + define CleanTest @$(PRINTF) "Cleaning test $(strip $1) ..." @$(PRINTF) "\n" $(LOG_DEBUG) diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index 112275355da..6d815bad51c 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -686,7 +686,7 @@ define SetupJavaCompilationBody # Check if a srczip was specified, then setup the rules for the srczip. ifneq (,$$($1_SRCZIP)) - $$(eval $$(call SetupZipArchive,ARCHIVE_$1, \ + $$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \ SRC:=$$($1_SRC), \ ZIP:=$$($1_SRCZIP), \ INCLUDES:=$$($1_INCLUDES), \