8260272: bash configure --prefix does not work after JDK-8257679

Reviewed-by: erikj, ihse
This commit is contained in:
Dongbo He 2021-01-25 01:08:38 +00:00 committed by Fei Yang
parent 4ae39b1481
commit 764111ff83

View file

@ -176,10 +176,10 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# space. # space.
[ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then [ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then
line="${input#$FIXPATH }" line="${input#$FIXPATH }"
prefix="$FIXPATH " fixpath_prefix="$FIXPATH "
else else
line="$input" line="$input"
prefix="" fixpath_prefix=""
fi ] fi ]
path="${line%% *}" path="${line%% *}"
arguments="${line#"$path"}" arguments="${line#"$path"}"
@ -247,11 +247,11 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# Now we have a usable command as new_path, with arguments in arguments # Now we have a usable command as new_path, with arguments in arguments
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$prefix" = x; then if test "x$fixpath_prefix" = x; then
# Only mess around if prefix was not given # Only mess around if fixpath_prefix was not given
UTIL_CHECK_WINENV_EXEC_TYPE("$new_path") UTIL_CHECK_WINENV_EXEC_TYPE("$new_path")
if test "x$RESULT" = xwindows; then if test "x$RESULT" = xwindows; then
prefix="$FIXPATH " fixpath_prefix="$FIXPATH "
# make sure we have an .exe suffix (but not two) # make sure we have an .exe suffix (but not two)
new_path="${new_path%.exe}.exe" new_path="${new_path%.exe}.exe"
else else
@ -262,11 +262,11 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
fi fi
if test "x$3" = xNOFIXPATH; then if test "x$3" = xNOFIXPATH; then
prefix="" fixpath_prefix=""
fi fi
# Now join together the path and the arguments once again # Now join together the path and the arguments once again
new_complete="$prefix$new_path$arguments" new_complete="$fixpath_prefix$new_path$arguments"
$1="$new_complete" $1="$new_complete"
fi fi
]) ])