common/makefiles/Main.gmk
changeset 20363 fa7663fc5d50
parent 20047 daafff583fd7
child 21173 0cd521b18e6b
equal deleted inserted replaced
20362:5f8289bfda3e 20363:fa7663fc5d50
    26 ### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
    26 ### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
    27 
    27 
    28 # Now load the spec
    28 # Now load the spec
    29 include $(SPEC)
    29 include $(SPEC)
    30 
    30 
    31 # Load the vital tools for all the makefiles. 
    31 # Load the vital tools for all the makefiles.
    32 include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
    32 include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
    33 
    33 
    34 # Include the corresponding custom file, if present.
    34 # Include the corresponding custom file, if present.
    35 -include $(CUSTOM_MAKE_DIR)/Main.gmk
    35 -include $(CUSTOM_MAKE_DIR)/Main.gmk
    36 
    36 
    37 ### Clean up from previous run
    37 ### Clean up from previous run
    38 
    38 
    39 # Remove any build.log from a previous run, if they exist
    39 # Remove any build.log from a previous run, if they exist
    40 ifneq (,$(BUILD_LOG))
    40 ifneq (,$(BUILD_LOG))
    41     ifneq (,$(BUILD_LOG_PREVIOUS))
    41   ifneq (,$(BUILD_LOG_PREVIOUS))
    42         # Rotate old log
    42     # Rotate old log
    43         $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
    43     $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
    44         $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
    44     $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
    45     else
    45   else
    46         $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
    46     $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
    47     endif
    47   endif
    48     $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
    48   $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
    49 endif
    49 endif
    50 # Remove any javac server logs and port files. This
    50 # Remove any javac server logs and port files. This
    51 # prevents a new make run to reuse the previous servers.
    51 # prevents a new make run to reuse the previous servers.
    52 ifneq (,$(SJAVAC_SERVER_DIR))
    52 ifneq (,$(SJAVAC_SERVER_DIR))
    53     $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
    53   $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
    54 endif
    54 endif
    55 
    55 
    56 # Reset the build timers.
    56 # Reset the build timers.
    57 $(eval $(call ResetAllTimers))
    57 $(eval $(call ResetAllTimers))
    58 
    58 
   101 	@$(call TargetEnter)
   101 	@$(call TargetEnter)
   102 	@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
   102 	@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
   103 	@$(call TargetExit)
   103 	@$(call TargetExit)
   104 
   104 
   105 ifeq ($(BUILD_HOTSPOT),true)
   105 ifeq ($(BUILD_HOTSPOT),true)
   106 hotspot: hotspot-only
   106   hotspot: hotspot-only
   107 hotspot-only: start-make
   107   hotspot-only: start-make
   108 	@$(call TargetEnter)
   108 	@$(call TargetEnter)
   109 	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
   109 	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
   110 	@$(call TargetExit)
   110 	@$(call TargetExit)
   111 endif
   111 endif
   112 
   112 
   147 	@$(call TargetEnter)
   147 	@$(call TargetEnter)
   148 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk profiles)
   148 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk profiles)
   149 	@$(call TargetExit)
   149 	@$(call TargetExit)
   150 
   150 
   151 profiles-oscheck:
   151 profiles-oscheck:
   152 ifneq ($(OPENJDK_TARGET_OS), linux)
   152         ifneq ($(OPENJDK_TARGET_OS), linux)
   153 	@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
   153 	  @echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
   154 endif
   154         endif
   155 
   155 
   156 install: images install-only
   156 install: images install-only
   157 install-only: start-make
   157 install-only: start-make
   158 	@$(call TargetEnter)
   158 	@$(call TargetEnter)
   159 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
   159 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
   200 # If the output directory was created by configure and now becomes empty, remove it as well.
   200 # If the output directory was created by configure and now becomes empty, remove it as well.
   201 # FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
   201 # FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
   202 dist-clean: clean
   202 dist-clean: clean
   203 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
   203 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
   204 	@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
   204 	@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
   205     if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
   205 	  if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
   206         $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
   206 	    $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
   207     else \
   207 	  else \
   208         ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
   208 	    ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
   209     fi \
   209 	  fi \
   210   )
   210 	)
   211 	@$(ECHO) Cleaned everything, you will have to re-run configure.
   211 	@$(ECHO) Cleaned everything, you will have to re-run configure.
   212 
   212 
   213 clean-langtools:
   213 clean-langtools:
   214 	$(call CleanComponent,langtools)
   214 	$(call CleanComponent,langtools)
   215 clean-corba:
   215 clean-corba: