提交 08c43639 编写于 作者: E erikj

8010385: build with LOG=trace broken on mac

Reviewed-by: dholmes, tbell, prr
上级 1d4e8781
...@@ -622,6 +622,14 @@ AC_PATH_PROGS(READELF, [readelf greadelf]) ...@@ -622,6 +622,14 @@ AC_PATH_PROGS(READELF, [readelf greadelf])
AC_PATH_PROG(HG, hg) AC_PATH_PROG(HG, hg)
AC_PATH_PROG(STAT, stat) AC_PATH_PROG(STAT, stat)
AC_PATH_PROG(TIME, time) AC_PATH_PROG(TIME, time)
# Check if it's GNU time
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
if test "x$IS_GNU_TIME" != x; then
IS_GNU_TIME=yes
else
IS_GNU_TIME=no
fi
AC_SUBST(IS_GNU_TIME)
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_PROG(COMM, comm) BASIC_REQUIRE_PROG(COMM, comm)
......
...@@ -799,6 +799,7 @@ OS_VERSION_MAJOR ...@@ -799,6 +799,7 @@ OS_VERSION_MAJOR
PKG_CONFIG PKG_CONFIG
CODESIGN CODESIGN
XATTR XATTR
IS_GNU_TIME
TIME TIME
STAT STAT
HG HG
...@@ -3785,7 +3786,7 @@ fi ...@@ -3785,7 +3786,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1372413413 DATE_WHEN_GENERATED=1372413705
############################################################################### ###############################################################################
# #
...@@ -10472,6 +10473,14 @@ $as_echo "no" >&6; } ...@@ -10472,6 +10473,14 @@ $as_echo "no" >&6; }
fi fi
# Check if it's GNU time
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
if test "x$IS_GNU_TIME" != x; then
IS_GNU_TIME=yes
else
IS_GNU_TIME=no
fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
...@@ -510,6 +510,7 @@ TAR:=@TAR@ ...@@ -510,6 +510,7 @@ TAR:=@TAR@
TAIL:=@TAIL@ TAIL:=@TAIL@
TEE:=@TEE@ TEE:=@TEE@
TIME:=@TIME@ TIME:=@TIME@
IS_GNU_TIME:=@IS_GNU_TIME@
TR:=@TR@ TR:=@TR@
TOUCH:=@TOUCH@ TOUCH:=@TOUCH@
UNIQ:=@UNIQ@ UNIQ:=@UNIQ@
......
...@@ -332,9 +332,11 @@ define SetupLogging ...@@ -332,9 +332,11 @@ define SetupLogging
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
# For each target executed, will print # For each target executed, will print
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer) # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin). # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
OLD_SHELL:=$$(SHELL) # (and causing a crash on Cygwin).
WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL) # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
# Only use time if it's GNU time which supports format and output file.
WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL) SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
endif endif
# Never remove warning messages; this is just for completeness # Never remove warning messages; this is just for completeness
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册