Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
8256538: Fix annoying awk warning in configure for java versions
Browse files Browse the repository at this point in the history
Backport-of: 3110d589e126af5bcc7a96661a98c4dd97d8cf91
  • Loading branch information
Yuri Nesterenko committed Jul 29, 2022
1 parent 8c54455 commit 5f78ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make/autoconf/boot-jdk.m4
Expand Up @@ -75,7 +75,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
# Additional [] needed to keep m4 from mangling shell constructs.
[ 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;}'` ]
[ 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;}'` ]
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
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.])
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
Expand Down Expand Up @@ -516,7 +516,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
# Additional [] needed to keep m4 from mangling shell constructs.
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
Expand Down

1 comment on commit 5f78ab1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.