mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8057537: Serialize reconfigure and fix make clean-foo foo
Reviewed-by: dholmes, ihse, tbell
This commit is contained in:
parent
ad3f82869f
commit
add8ed526a
26
Makefile
26
Makefile
@ -108,12 +108,23 @@ else
|
||||
$(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
|
||||
endif
|
||||
|
||||
# Split out the targets requiring sequential execution. Run these targets separately
|
||||
# from the rest so that the rest may still enjoy full parallel execution.
|
||||
SEQUENTIAL_TARGETS := $(filter dist-clean clean% reconfigure, $(MAIN_TARGETS))
|
||||
PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
|
||||
|
||||
main-wrapper:
|
||||
@$(if $(findstring clean, $(MAIN_TARGETS)), , $(call AtMakeStart))
|
||||
(cd $(root_dir)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \
|
||||
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(MAIN_TARGETS) \
|
||||
$(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC)))
|
||||
@$(if $(findstring clean, $(MAIN_TARGETS)), , $(call AtMakeEnd))
|
||||
ifneq ($(SEQUENTIAL_TARGETS), )
|
||||
(cd $(root_dir)/make && $(MAKE) -f Main.gmk SPEC=$(SPEC) -j 1 \
|
||||
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(SEQUENTIAL_TARGETS))
|
||||
endif
|
||||
ifneq ($(PARALLEL_TARGETS), )
|
||||
@$(call AtMakeStart)
|
||||
(cd $(root_dir)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \
|
||||
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(PARALLEL_TARGETS) \
|
||||
$(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC)))
|
||||
@$(call AtMakeEnd)
|
||||
endif
|
||||
|
||||
.PHONY: main-wrapper
|
||||
|
||||
@ -138,10 +149,9 @@ help:
|
||||
$(info . make profiles # Create complete j2re compact profile images)
|
||||
$(info . make bootcycle-images # Build images twice, second time with newly built JDK)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make reconfigure # Rerun configure with the same arguments as last time)
|
||||
$(info . make clean # Remove all files generated by make, but not those)
|
||||
$(info . # generated by configure. Do not run clean and other)
|
||||
$(info . # targets together as that might behave in an)
|
||||
$(info . # unexpected way.)
|
||||
$(info . # generated by configure)
|
||||
$(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))
|
||||
|
||||
@ -487,17 +487,8 @@ ALL_TARGETS += default all
|
||||
# Clean targets
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# 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 targets are automatically run serially by the Makefile calling this
|
||||
# file.
|
||||
|
||||
CLEAN_COMPONENTS += langtools corba hotspot jdk nashorn images \
|
||||
bootcycle-build docs docstemp test
|
||||
@ -543,6 +534,9 @@ ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
|
||||
@if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
|
||||
endif
|
||||
|
||||
# The reconfigure target is automatically run serially from everything else
|
||||
# by the Makefile calling this file.
|
||||
|
||||
reconfigure:
|
||||
ifneq ($(CONFIGURE_COMMAND_LINE), )
|
||||
@$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user