524 images: product-images 525 docs: docs-image 526 all: all-images 527 528 ALL_TARGETS += default jdk images docs all 529 530 ################################################################################ 531 ################################################################################ 532 # 533 # Clean targets 534 # 535 ################################################################################ 536 # Clean targets are automatically run serially by the Makefile calling this 537 # file. 538 539 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \ 540 images make-support test-make bundles 541 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS)) 542 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native 543 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS)) 544 CLEAN_PHASES := gensrc java native include 545 CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES)) 546 CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES)) 547 # Construct targets of the form clean-$module-$phase 548 CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \ 549 $(addprefix $m-, $(CLEAN_PHASES)))) 550 551 # Remove everything, except the output from configure. 552 clean: $(CLEAN_DIR_TARGETS) 553 ($(CD) $(OUTPUT_ROOT) && $(RM) -r source_tips build.log* build-trace*.log*) 554 $(ECHO) Cleaned all build artifacts. 555 556 $(CLEAN_DIR_TARGETS): 557 $(call CleanDir,$(patsubst clean-%, %, $@)) 558 559 $(CLEAN_TEST_TARGETS): 560 $(call CleanTest,$(patsubst clean-test-%, %, $@)) 561 562 $(CLEAN_PHASE_TARGETS): 563 $(call Clean-$(patsubst clean-%,%, $@)) 564 565 $(CLEAN_MODULE_TARGETS): 566 $(call CleanModule,$(patsubst clean-%, %, $@)) 567 568 $(CLEAN_MODULE_PHASE_TARGETS): 569 $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \ 570 $(word 2, $(subst -,$(SPACE),$@))) 571 572 # When removing the support dir, we must also remove jdk. Building classes has 573 # the side effect of generating native headers. The headers end up in support 574 # while classes and touch files end up in jdk. 575 clean-support: clean-jdk 576 577 clean-docs: clean-docstemp 578 579 # Remove everything, including configure configuration. 580 # If the output directory was created by configure and now becomes empty, remove it as well. 581 dist-clean: clean 582 ($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments \ 583 Makefile compare.sh tmp javacservers) 584 $(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \ 585 if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \ 586 $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \ 587 else \ 588 ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \ 589 && $(RM) -r $(OUTPUT_ROOT)) \ 590 fi \ 591 ) 592 $(ECHO) Cleaned everything, you will have to re-run configure. 593 594 ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_TEST_TARGETS) \ 595 $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS) 596 597 ################################################################################ 598 # Declare *-only targets for each normal target 599 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t))) 600 601 ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS))) 602 603 ################################################################################ | 524 images: product-images 525 docs: docs-image 526 all: all-images 527 528 ALL_TARGETS += default jdk images docs all 529 530 ################################################################################ 531 ################################################################################ 532 # 533 # Clean targets 534 # 535 ################################################################################ 536 # Clean targets are automatically run serially by the Makefile calling this 537 # file. 538 539 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \ 540 images make-support test-make bundles 541 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS)) 542 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native 543 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS)) 544 CLEAN_PHASES := gensrc java native include docs 545 CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES)) 546 CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES)) 547 # Construct targets of the form clean-$module-$phase 548 CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \ 549 $(addprefix $m-, $(CLEAN_PHASES)))) 550 551 # Remove everything, except the output from configure. 552 clean: $(CLEAN_DIR_TARGETS) 553 ($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*) 554 $(ECHO) Cleaned all build artifacts. 555 556 $(CLEAN_DIR_TARGETS): 557 $(call CleanDir,$(patsubst clean-%, %, $@)) 558 559 $(CLEAN_TEST_TARGETS): 560 $(call CleanTest,$(patsubst clean-test-%, %, $@)) 561 562 $(CLEAN_PHASE_TARGETS): 563 $(call Clean-$(patsubst clean-%,%, $@)) 564 565 $(CLEAN_MODULE_TARGETS): 566 $(call CleanModule,$(patsubst clean-%, %, $@)) 567 568 $(CLEAN_MODULE_PHASE_TARGETS): 569 $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \ 570 $(word 2, $(subst -,$(SPACE),$@))) 571 572 # When removing the support dir, we must also remove jdk. Building classes has 573 # the side effect of generating native headers. The headers end up in support 574 # while classes and touch files end up in jdk. 575 clean-support: clean-jdk 576 577 # Remove everything, including configure configuration. If the output 578 # directory was created by configure and now becomes empty, remove it as well. 579 dist-clean: clean 580 ($(CD) $(OUTPUT_ROOT) && \ 581 $(RM) -r *spec.gmk configure-support Makefile compare.sh ide) 582 $(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \ 583 if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \ 584 $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \ 585 else \ 586 ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \ 587 && $(RM) -r $(OUTPUT_ROOT)) \ 588 fi \ 589 ) 590 $(ECHO) Cleaned everything, you will have to re-run configure. 591 592 ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_TEST_TARGETS) \ 593 $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS) 594 595 ################################################################################ 596 # Declare *-only targets for each normal target 597 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t))) 598 599 ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS))) 600 601 ################################################################################ |