# HG changeset patch # User ihse # Date 1442821237 -7200 # Node ID d3203fd9e4470279c919ae77b68dcfa7efd7094f # Parent 4d558a41a1ec67ca488689250e5c9d1c94a54082 8136764: ORIGINAL_PATH is broken if PATH contains directory with "#" in it's name Reviewed-by: erikj, tbell diff -r 4d558a41a1ec -r d3203fd9e447 common/autoconf/basics.m4 --- a/common/autoconf/basics.m4 Mon Sep 21 09:32:07 2015 +0200 +++ b/common/autoconf/basics.m4 Mon Sep 21 09:40:37 2015 +0200 @@ -445,6 +445,15 @@ # Save the current directory this script was started from CURDIR="$PWD" + # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them + # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED + # was not available at that time. + REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'` + if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then + ORIGINAL_PATH="$REWRITTEN_PATH" + AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH]) + fi + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then PATH_SEP=";" BASIC_CHECK_PATHS_WINDOWS diff -r 4d558a41a1ec -r d3203fd9e447 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Mon Sep 21 09:32:07 2015 +0200 +++ b/common/autoconf/generated-configure.sh Mon Sep 21 09:40:37 2015 +0200 @@ -4362,7 +4362,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1442820670 +DATE_WHEN_GENERATED=1442820958 ############################################################################### # @@ -13844,6 +13844,16 @@ # Save the current directory this script was started from CURDIR="$PWD" + # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them + # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED + # was not available at that time. + REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'` + if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then + ORIGINAL_PATH="$REWRITTEN_PATH" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5 +$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;} + fi + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then PATH_SEP=";"