91 include $(SPEC) 92 93 ### Clean up from previous run 94 # Remove any build.log from a previous run, if they exist 95 ifneq (,$(BUILD_LOG)) 96 ifneq (,$(BUILD_LOG_PREVIOUS)) 97 # Rotate old log 98 $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null) 99 $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null) 100 else 101 $(shell $(RM) $(BUILD_LOG) 2> /dev/null) 102 endif 103 $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null) 104 endif 105 # Remove any javac server logs and port files. This 106 # prevents a new make run to reuse the previous servers. 107 ifneq (,$(SJAVAC_SERVER_DIR)) 108 $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*) 109 endif 110 111 main-wrapper: 112 @$(if $(findstring clean, $(MAIN_TARGETS)), , $(call AtMakeStart)) 113 (cd $(root_dir)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \ 114 $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(MAIN_TARGETS) \ 115 $(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC))) 116 @$(if $(findstring clean, $(MAIN_TARGETS)), , $(call AtMakeEnd)) 117 118 .PHONY: main-wrapper 119 120 endif 121 endif 122 123 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. 124 # If you add more global targets, please update the variable global_targets in MakeHelpers. 125 126 help: 127 $(info ) 128 $(info OpenJDK Makefile help) 129 $(info =====================) 130 $(info ) 131 $(info Common make targets) 132 $(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,) 133 $(info . # corba and jdk and create a runnable "exploded" image) 134 $(info . make all # Compile everything, all repos, docs and images) 135 $(info . make images # Create complete j2sdk and j2re images) 136 $(info . make docs # Create all docs) 137 $(info . make docs-javadoc # Create just javadocs, depends on less than full docs) 138 $(info . make profiles # Create complete j2re compact profile images) 139 $(info . make bootcycle-images # Build images twice, second time with newly built JDK) 140 $(info . make install # Install the generated images locally) 141 $(info . make clean # Remove all files generated by make, but not those) 142 $(info . # generated by configure. Do not run clean and other) 143 $(info . # targets together as that might behave in an) 144 $(info . # unexpected way.) 145 $(info . make dist-clean # Remove all files, including configuration) 146 $(info . make help # Give some help on using make) 147 $(info . make test # Run tests, default is all tests (see TEST below)) 148 $(info ) 149 $(info Targets for specific modules) 150 $(info . make <module> # Build <module> and everything it depends on. ) 151 $(info . make <module>-only # Build <module> only, without dependencies. This) 152 $(info . # is faster but can result in incorrect build results!) 153 $(info . make <module>-java # Compile java classes for <module> and everything it) 154 $(info . # depends on) 155 $(info . make <module>-libs # Build native libraries for <module> and everything it) 156 $(info . # depends on) 157 $(info . make <module>-launchers# Build native executables for <module> and everything it) 158 $(info . # depends on) 159 $(info . make <module>-gensrc # Execute the gensrc step for <module> and everything it) 160 $(info . # depends on) 161 $(info ) 162 $(info Useful make variables) 163 $(info . make CONF= # Build all configurations (note, assignment is empty)) 164 $(info . make CONF=<substring> # Build the configuration(s) with a name matching) | 91 include $(SPEC) 92 93 ### Clean up from previous run 94 # Remove any build.log from a previous run, if they exist 95 ifneq (,$(BUILD_LOG)) 96 ifneq (,$(BUILD_LOG_PREVIOUS)) 97 # Rotate old log 98 $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null) 99 $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null) 100 else 101 $(shell $(RM) $(BUILD_LOG) 2> /dev/null) 102 endif 103 $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null) 104 endif 105 # Remove any javac server logs and port files. This 106 # prevents a new make run to reuse the previous servers. 107 ifneq (,$(SJAVAC_SERVER_DIR)) 108 $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*) 109 endif 110 111 # Split out the targets requiring sequential execution. Run these targets separately 112 # from the rest so that the rest may still enjoy full parallel execution. 113 SEQUENTIAL_TARGETS := $(filter dist-clean clean% reconfigure, $(MAIN_TARGETS)) 114 PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS)) 115 116 main-wrapper: 117 ifneq ($(SEQUENTIAL_TARGETS), ) 118 (cd $(root_dir)/make && $(MAKE) -f Main.gmk SPEC=$(SPEC) -j 1 \ 119 $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(SEQUENTIAL_TARGETS)) 120 endif 121 ifneq ($(PARALLEL_TARGETS), ) 122 @$(call AtMakeStart) 123 (cd $(root_dir)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \ 124 $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(PARALLEL_TARGETS) \ 125 $(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC))) 126 @$(call AtMakeEnd) 127 endif 128 129 .PHONY: main-wrapper 130 131 endif 132 endif 133 134 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. 135 # If you add more global targets, please update the variable global_targets in MakeHelpers. 136 137 help: 138 $(info ) 139 $(info OpenJDK Makefile help) 140 $(info =====================) 141 $(info ) 142 $(info Common make targets) 143 $(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,) 144 $(info . # corba and jdk and create a runnable "exploded" image) 145 $(info . make all # Compile everything, all repos, docs and images) 146 $(info . make images # Create complete j2sdk and j2re images) 147 $(info . make docs # Create all docs) 148 $(info . make docs-javadoc # Create just javadocs, depends on less than full docs) 149 $(info . make profiles # Create complete j2re compact profile images) 150 $(info . make bootcycle-images # Build images twice, second time with newly built JDK) 151 $(info . make install # Install the generated images locally) 152 $(info . make reconfigure # Rerun configure with the same arguments as last time) 153 $(info . make clean # Remove all files generated by make, but not those) 154 $(info . # generated by configure) 155 $(info . make dist-clean # Remove all files, including configuration) 156 $(info . make help # Give some help on using make) 157 $(info . make test # Run tests, default is all tests (see TEST below)) 158 $(info ) 159 $(info Targets for specific modules) 160 $(info . make <module> # Build <module> and everything it depends on. ) 161 $(info . make <module>-only # Build <module> only, without dependencies. This) 162 $(info . # is faster but can result in incorrect build results!) 163 $(info . make <module>-java # Compile java classes for <module> and everything it) 164 $(info . # depends on) 165 $(info . make <module>-libs # Build native libraries for <module> and everything it) 166 $(info . # depends on) 167 $(info . make <module>-launchers# Build native executables for <module> and everything it) 168 $(info . # depends on) 169 $(info . make <module>-gensrc # Execute the gensrc step for <module> and everything it) 170 $(info . # depends on) 171 $(info ) 172 $(info Useful make variables) 173 $(info . make CONF= # Build all configurations (note, assignment is empty)) 174 $(info . make CONF=<substring> # Build the configuration(s) with a name matching) |