692 LogCmdlines = $(info $(strip $1))
693 else
694 LogCmdlines =
695 endif
696
697 ################################################################################
698 # ExecuteWithLog will run a command and log the output appropriately. This is
699 # meant to be used by commands that do "real" work, like a compilation.
700 # The output is stored in a specified log file, which is displayed at the end
701 # of the build in case of failure. The command line itself is stored in a file,
702 # and also logged to stdout if the LOG=cmdlines option has been given.
703 #
704 # Param 1 - The path to base the name of the log file / command line file on
705 # Param 2 - The command to run
706 ExecuteWithLog = \
707 $(call LogCmdlines, Exececuting: [$(strip $2)]) \
708 $(call WriteFile, $2, $(strip $1).cmdline) \
709 ( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
710 ( exitcode=$(DOLLAR)? && \
711 $(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(BUILD_OUTPUT)/%,%,$(strip $1))).log && \
712 exit $(DOLLAR)exitcode ) )
713
714 ################################################################################
715 # Find lib dir for module
716 # Param 1 - module name
717 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
718 FindLibDirForModule = \
719 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
720 else
721 FindLibDirForModule = \
722 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
723 endif
724
725 ################################################################################
726 # Return a string suitable for use after a -classpath or -modulepath option. It
727 # will be correct and safe to use on all platforms. Arguments are given as space
728 # separate classpath entries. Safe for multiple nested calls.
729 # param 1 : A space separated list of classpath entries
730 # The surrounding strip is needed to keep additional whitespace out
731 PathList = \
732 "$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
|
692 LogCmdlines = $(info $(strip $1))
693 else
694 LogCmdlines =
695 endif
696
697 ################################################################################
698 # ExecuteWithLog will run a command and log the output appropriately. This is
699 # meant to be used by commands that do "real" work, like a compilation.
700 # The output is stored in a specified log file, which is displayed at the end
701 # of the build in case of failure. The command line itself is stored in a file,
702 # and also logged to stdout if the LOG=cmdlines option has been given.
703 #
704 # Param 1 - The path to base the name of the log file / command line file on
705 # Param 2 - The command to run
706 ExecuteWithLog = \
707 $(call LogCmdlines, Exececuting: [$(strip $2)]) \
708 $(call WriteFile, $2, $(strip $1).cmdline) \
709 ( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
710 ( exitcode=$(DOLLAR)? && \
711 $(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(BUILD_OUTPUT)/%,%,$(strip $1))).log && \
712 exit $(DOLLAR)exitcode ) ) && wait
713
714 ################################################################################
715 # Find lib dir for module
716 # Param 1 - module name
717 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
718 FindLibDirForModule = \
719 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
720 else
721 FindLibDirForModule = \
722 $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
723 endif
724
725 ################################################################################
726 # Return a string suitable for use after a -classpath or -modulepath option. It
727 # will be correct and safe to use on all platforms. Arguments are given as space
728 # separate classpath entries. Safe for multiple nested calls.
729 # param 1 : A space separated list of classpath entries
730 # The surrounding strip is needed to keep additional whitespace out
731 PathList = \
732 "$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
|