Skip to content

Commit 3110d58

Browse files
committedNov 18, 2020
8256538: Fix annoying awk warning in configure for java versions
Reviewed-by: erikj
1 parent 03e84ef commit 3110d58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎make/autoconf/boot-jdk.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
7575
else
7676
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
7777
# Additional [] needed to keep m4 from mangling shell constructs.
78-
[ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
78+
[ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
7979
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
8080
AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
8181
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
@@ -516,7 +516,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
516516
else
517517
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
518518
# Additional [] needed to keep m4 from mangling shell constructs.
519-
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
519+
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
520520
521521
# Extra M4 quote needed to protect [] in grep expression.
522522
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]

0 commit comments

Comments
 (0)
Please sign in to comment.