Tue, 02 Jul 2013 15:07:05 +0200
8019537: jdk8-build prebuild fails in source bundle generation, The path of TOOLS_DIR ... is not found
Reviewed-by: tbell
common/autoconf/basics.m4 | file | annotate | diff | comparison | revisions | |
common/autoconf/generated-configure.sh | file | annotate | diff | comparison | revisions |
1.1 --- a/common/autoconf/basics.m4 Mon Jul 01 15:40:27 2013 +0200 1.2 +++ b/common/autoconf/basics.m4 Tue Jul 02 15:07:05 2013 +0200 1.3 @@ -362,9 +362,8 @@ 1.4 1.5 AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir], 1.6 [search this directory for compilers and tools (for cross-compiling)])], 1.7 - [TOOLS_DIR=$with_tools_dir 1.8 - BASIC_FIXUP_PATH([TOOLS_DIR]) 1.9 - ]) 1.10 + [TOOLS_DIR=$with_tools_dir] 1.11 +) 1.12 1.13 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], 1.14 [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
2.1 --- a/common/autoconf/generated-configure.sh Mon Jul 01 15:40:27 2013 +0200 2.2 +++ b/common/autoconf/generated-configure.sh Tue Jul 02 15:07:05 2013 +0200 2.3 @@ -3786,7 +3786,7 @@ 2.4 #CUSTOM_AUTOCONF_INCLUDE 2.5 2.6 # Do not change or remove the following line, it is needed for consistency checks: 2.7 -DATE_WHEN_GENERATED=1372685988 2.8 +DATE_WHEN_GENERATED=1372770384 2.9 2.10 ############################################################################### 2.11 # 2.12 @@ -7462,128 +7462,6 @@ 2.13 if test "${with_tools_dir+set}" = set; then : 2.14 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir 2.15 2.16 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.17 - 2.18 - # Input might be given as Windows format, start by converting to 2.19 - # unix format. 2.20 - path="$TOOLS_DIR" 2.21 - new_path=`$CYGPATH -u "$path"` 2.22 - 2.23 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.24 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.25 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.26 - # "foo.exe" is OK but "foo" is an error. 2.27 - # 2.28 - # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.29 - # It is also a way to make sure we got the proper file name for the real test later on. 2.30 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.31 - if test "x$test_shortpath" = x; then 2.32 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&5 2.33 -$as_echo "$as_me: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&6;} 2.34 - as_fn_error $? "Cannot locate the the path of TOOLS_DIR" "$LINENO" 5 2.35 - fi 2.36 - 2.37 - # Call helper function which possibly converts this using DOS-style short mode. 2.38 - # If so, the updated path is stored in $new_path. 2.39 - 2.40 - input_path="$new_path" 2.41 - # Check if we need to convert this using DOS-style short mode. If the path 2.42 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.43 - # take no chances and rewrite it. 2.44 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.45 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.46 - if test "x$has_forbidden_chars" != x; then 2.47 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.48 - shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.49 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.50 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.51 - # Going to short mode and back again did indeed matter. Since short mode is 2.52 - # case insensitive, let's make it lowercase to improve readability. 2.53 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.54 - # Now convert it back to Unix-stile (cygpath) 2.55 - input_path=`$CYGPATH -u "$shortmode_path"` 2.56 - new_path="$input_path" 2.57 - fi 2.58 - fi 2.59 - 2.60 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.61 - if test "x$test_cygdrive_prefix" = x; then 2.62 - # As a simple fix, exclude /usr/bin since it's not a real path. 2.63 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.64 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.65 - # a path prefixed by /cygdrive for fixpath to work. 2.66 - new_path="$CYGWIN_ROOT_PATH$input_path" 2.67 - fi 2.68 - fi 2.69 - 2.70 - 2.71 - if test "x$path" != "x$new_path"; then 2.72 - TOOLS_DIR="$new_path" 2.73 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOOLS_DIR to \"$new_path\"" >&5 2.74 -$as_echo "$as_me: Rewriting TOOLS_DIR to \"$new_path\"" >&6;} 2.75 - fi 2.76 - 2.77 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.78 - 2.79 - path="$TOOLS_DIR" 2.80 - has_colon=`$ECHO $path | $GREP ^.:` 2.81 - new_path="$path" 2.82 - if test "x$has_colon" = x; then 2.83 - # Not in mixed or Windows style, start by that. 2.84 - new_path=`cmd //c echo $path` 2.85 - fi 2.86 - 2.87 - 2.88 - input_path="$new_path" 2.89 - # Check if we need to convert this using DOS-style short mode. If the path 2.90 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.91 - # take no chances and rewrite it. 2.92 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.93 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.94 - if test "x$has_forbidden_chars" != x; then 2.95 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.96 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.97 - fi 2.98 - 2.99 - 2.100 - windows_path="$new_path" 2.101 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.102 - unix_path=`$CYGPATH -u "$windows_path"` 2.103 - new_path="$unix_path" 2.104 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.105 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.106 - new_path="$unix_path" 2.107 - fi 2.108 - 2.109 - if test "x$path" != "x$new_path"; then 2.110 - TOOLS_DIR="$new_path" 2.111 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOOLS_DIR to \"$new_path\"" >&5 2.112 -$as_echo "$as_me: Rewriting TOOLS_DIR to \"$new_path\"" >&6;} 2.113 - fi 2.114 - 2.115 - # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.116 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.117 - 2.118 - else 2.119 - # We're on a posix platform. Hooray! :) 2.120 - path="$TOOLS_DIR" 2.121 - has_space=`$ECHO "$path" | $GREP " "` 2.122 - if test "x$has_space" != x; then 2.123 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&5 2.124 -$as_echo "$as_me: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&6;} 2.125 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.126 - fi 2.127 - 2.128 - # Use eval to expand a potential ~ 2.129 - eval path="$path" 2.130 - if test ! -f "$path" && test ! -d "$path"; then 2.131 - as_fn_error $? "The path of TOOLS_DIR, which resolves as \"$path\", is not found." "$LINENO" 5 2.132 - fi 2.133 - 2.134 - TOOLS_DIR="`cd "$path"; $THEPWDCMD -L`" 2.135 - fi 2.136 - 2.137 - 2.138 fi 2.139 2.140