# HG changeset patch # User ihse # Date 1424872207 -3600 # Node ID 907bcc4ce2906a93ed819138f1b15be983724bbd # Parent d5e775680e97d21d955ae962842baef7e0a2bd1c 8073864: Configure must handle invalid elements on INCLUDE/LIB for visualstudio Reviewed-by: erikj diff -r d5e775680e97 -r 907bcc4ce290 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Wed Feb 25 14:48:41 2015 +0100 +++ b/common/autoconf/generated-configure.sh Wed Feb 25 14:50:07 2015 +0100 @@ -4393,7 +4393,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1424872060 +DATE_WHEN_GENERATED=1424872170 ############################################################################### # @@ -27696,7 +27696,22 @@ IFS=";" for i in $VS_INCLUDE; do ipath=$i - IFS="$OLDIFS" + # Only process non-empty elements + if test "x$ipath" != x; then + IFS="$OLDIFS" + # Check that directory exists before calling fixup_path + testpath=$ipath + + windows_path="$testpath" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + testpath="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + testpath="$unix_path" + fi + + if test -d "$testpath"; then # Only process if variable expands to non-empty @@ -27823,13 +27838,30 @@ fi fi - IFS=";" - SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath" + SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath" + fi + IFS=";" + fi done # Convert VS_LIB into SYSROOT_LDFLAGS for i in $VS_LIB; do libpath=$i - IFS="$OLDIFS" + # Only process non-empty elements + if test "x$libpath" != x; then + IFS="$OLDIFS" + # Check that directory exists before calling fixup_path + testpath=$libpath + + windows_path="$testpath" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + testpath="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + testpath="$unix_path" + fi + + if test -d "$testpath"; then # Only process if variable expands to non-empty @@ -27956,8 +27988,10 @@ fi fi - IFS=";" - SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath" + SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath" + fi + IFS=";" + fi done IFS="$OLDIFS" fi diff -r d5e775680e97 -r 907bcc4ce290 common/autoconf/toolchain_windows.m4 --- a/common/autoconf/toolchain_windows.m4 Wed Feb 25 14:48:41 2015 +0100 +++ b/common/autoconf/toolchain_windows.m4 Wed Feb 25 14:50:07 2015 +0100 @@ -351,18 +351,34 @@ IFS=";" for i in $VS_INCLUDE; do ipath=$i - IFS="$OLDIFS" - BASIC_FIXUP_PATH([ipath]) - IFS=";" - SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath" + # Only process non-empty elements + if test "x$ipath" != x; then + IFS="$OLDIFS" + # Check that directory exists before calling fixup_path + testpath=$ipath + BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath]) + if test -d "$testpath"; then + BASIC_FIXUP_PATH([ipath]) + SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath" + fi + IFS=";" + fi done # Convert VS_LIB into SYSROOT_LDFLAGS for i in $VS_LIB; do libpath=$i - IFS="$OLDIFS" - BASIC_FIXUP_PATH([libpath]) - IFS=";" - SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath" + # Only process non-empty elements + if test "x$libpath" != x; then + IFS="$OLDIFS" + # Check that directory exists before calling fixup_path + testpath=$libpath + BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath]) + if test -d "$testpath"; then + BASIC_FIXUP_PATH([libpath]) + SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath" + fi + IFS=";" + fi done IFS="$OLDIFS" fi