RFR: 8283575: Check for GNU time fails for version >1.7
Magnus Ihse Bursie
ihse at openjdk.java.net
Wed Mar 23 21:18:53 UTC 2022
On Wed, 23 Mar 2022 15:35:44 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> The version output of GNU time changed from "GNU time" to "GNU Time" in version 1.8. We need to update our check for identifying GNU time to handle this.
I usually handle cases like this by prefixing with a comment:
# Additional [] needed to keep m4 from mangling shell constructs.
and then wrap the entire statement in an outer `[ ]` so the inner, "real" brackets are unchanged.
make/autoconf/basic_tools.m4 line 351:
> 349: UTIL_LOOKUP_PROGS(PATCH, gpatch patch)
> 350: # Check if it's GNU time
> 351: IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU [[Tt]]ime'`
Suggestion:
[ IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU [Tt]ime'` ]
Like this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7925
More information about the build-dev
mailing list