Fri, 28 Jun 2013 12:02:37 +0200
8010385: build with LOG=trace broken on mac
Reviewed-by: dholmes, tbell, prr
1.1 --- a/common/autoconf/basics.m4 Fri Jun 28 12:00:03 2013 +0200 1.2 +++ b/common/autoconf/basics.m4 Fri Jun 28 12:02:37 2013 +0200 1.3 @@ -622,6 +622,14 @@ 1.4 AC_PATH_PROG(HG, hg) 1.5 AC_PATH_PROG(STAT, stat) 1.6 AC_PATH_PROG(TIME, time) 1.7 +# Check if it's GNU time 1.8 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` 1.9 +if test "x$IS_GNU_TIME" != x; then 1.10 + IS_GNU_TIME=yes 1.11 +else 1.12 + IS_GNU_TIME=no 1.13 +fi 1.14 +AC_SUBST(IS_GNU_TIME) 1.15 1.16 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 1.17 BASIC_REQUIRE_PROG(COMM, comm)
2.1 --- a/common/autoconf/generated-configure.sh Fri Jun 28 12:00:03 2013 +0200 2.2 +++ b/common/autoconf/generated-configure.sh Fri Jun 28 12:02:37 2013 +0200 2.3 @@ -799,6 +799,7 @@ 2.4 PKG_CONFIG 2.5 CODESIGN 2.6 XATTR 2.7 +IS_GNU_TIME 2.8 TIME 2.9 STAT 2.10 HG 2.11 @@ -3785,7 +3786,7 @@ 2.12 #CUSTOM_AUTOCONF_INCLUDE 2.13 2.14 # Do not change or remove the following line, it is needed for consistency checks: 2.15 -DATE_WHEN_GENERATED=1372413413 2.16 +DATE_WHEN_GENERATED=1372413705 2.17 2.18 ############################################################################### 2.19 # 2.20 @@ -10472,6 +10473,14 @@ 2.21 fi 2.22 2.23 2.24 +# Check if it's GNU time 2.25 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` 2.26 +if test "x$IS_GNU_TIME" != x; then 2.27 + IS_GNU_TIME=yes 2.28 +else 2.29 + IS_GNU_TIME=no 2.30 +fi 2.31 + 2.32 2.33 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 2.34
3.1 --- a/common/autoconf/spec.gmk.in Fri Jun 28 12:00:03 2013 +0200 3.2 +++ b/common/autoconf/spec.gmk.in Fri Jun 28 12:02:37 2013 +0200 3.3 @@ -510,6 +510,7 @@ 3.4 TAIL:=@TAIL@ 3.5 TEE:=@TEE@ 3.6 TIME:=@TIME@ 3.7 +IS_GNU_TIME:=@IS_GNU_TIME@ 3.8 TR:=@TR@ 3.9 TOUCH:=@TOUCH@ 3.10 UNIQ:=@UNIQ@
4.1 --- a/common/makefiles/MakeBase.gmk Fri Jun 28 12:00:03 2013 +0200 4.2 +++ b/common/makefiles/MakeBase.gmk Fri Jun 28 12:02:37 2013 +0200 4.3 @@ -332,9 +332,11 @@ 4.4 # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make 4.5 # For each target executed, will print 4.6 # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer) 4.7 - # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin). 4.8 - OLD_SHELL:=$$(SHELL) 4.9 - WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL) 4.10 + # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much 4.11 + # (and causing a crash on Cygwin). 4.12 + # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris. 4.13 + # Only use time if it's GNU time which supports format and output file. 4.14 + 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 4.15 SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL) 4.16 endif 4.17 # Never remove warning messages; this is just for completeness