Wed, 11 Apr 2018 04:42:33 -0700
8035495: Improvements in autoconf integration
Reviewed-by: ihse, mduigou, tbell
1.1 --- a/common/autoconf/Makefile.in Tue Apr 10 07:46:25 2018 -0700 1.2 +++ b/common/autoconf/Makefile.in Wed Apr 11 04:42:33 2018 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 # 1.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 # 1.9 # This code is free software; you can redistribute it and/or modify it 1.10 @@ -24,4 +24,4 @@ 1.11 # This Makefile was generated by configure @DATE_WHEN_CONFIGURED@ 1.12 # GENERATED FILE, DO NOT EDIT 1.13 SPEC:=@OUTPUT_ROOT@/spec.gmk 1.14 -include @SRC_ROOT@/Makefile 1.15 +include @TOPDIR@/Makefile
2.1 --- a/common/autoconf/autogen.sh Tue Apr 10 07:46:25 2018 -0700 2.2 +++ b/common/autoconf/autogen.sh Wed Apr 11 04:42:33 2018 -0700 2.3 @@ -22,6 +22,23 @@ 2.4 # questions. 2.5 # 2.6 2.7 +generate_configure_script() { 2.8 + # First create a header 2.9 + cat > $1 << EOT 2.10 +#!/bin/bash 2.11 +# 2.12 +# ########################################################## 2.13 +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### 2.14 +# ########################################################## 2.15 +# 2.16 +EOT 2.17 + # Then replace "magic" variables in configure.ac and append the output 2.18 + # from autoconf. $2 is either cat (just a no-op) or a filter. 2.19 + cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ 2.20 + eval $2 | ${AUTOCONF} -W all -I$script_dir - >> $1 2.21 + rm -rf autom4te.cache 2.22 +} 2.23 + 2.24 script_dir=`dirname $0` 2.25 2.26 # Create a timestamp as seconds since epoch 2.27 @@ -36,7 +53,8 @@ 2.28 fi 2.29 2.30 if test "x$CUSTOM_CONFIG_DIR" = "x"; then 2.31 - custom_script_dir="$script_dir/../../jdk/make/closed/autoconf" 2.32 + topdir=`cd $script_dir/../.. >/dev/null && pwd` 2.33 + custom_script_dir="$topdir/jdk/make/closed/autoconf" 2.34 else 2.35 custom_script_dir=$CUSTOM_CONFIG_DIR 2.36 fi 2.37 @@ -45,25 +63,23 @@ 2.38 2.39 AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`" 2.40 2.41 -echo "Autoconf found: ${AUTOCONF}" 2.42 - 2.43 if test "x${AUTOCONF}" = x; then 2.44 - echo You need autoconf installed to be able to regenerate the configure script 2.45 - echo Error: Cannot find autoconf 1>&2 2.46 + echo "You need autoconf installed to be able to regenerate the configure script" 2.47 + echo "Error: Cannot find autoconf" 1>&2 2.48 exit 1 2.49 fi 2.50 2.51 -echo Generating generated-configure.sh with ${AUTOCONF} 2.52 -cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh 2.53 -rm -rf autom4te.cache 2.54 +autoconf_version=`$AUTOCONF --version | head -1` 2.55 +echo "Using autoconf at ${AUTOCONF} [$autoconf_version]" 2.56 + 2.57 +echo "Generating generated-configure.sh" 2.58 +generate_configure_script "$script_dir/generated-configure.sh" 'cat' 2.59 2.60 if test -e $custom_hook; then 2.61 - echo Generating custom generated-configure.sh 2.62 # We have custom sources available; also generate configure script 2.63 # with custom hooks compiled in. 2.64 - cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ 2.65 - sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh 2.66 - rm -rf autom4te.cache 2.67 + echo "Generating custom generated-configure.sh" 2.68 + generate_configure_script "$custom_script_dir/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"' 2.69 else 2.70 - echo No custom hook found: $custom_hook 2.71 + echo "(No custom hook found at $custom_hook)" 2.72 fi
3.1 --- a/common/autoconf/basics.m4 Tue Apr 10 07:46:25 2018 -0700 3.2 +++ b/common/autoconf/basics.m4 Wed Apr 11 04:42:33 2018 -0700 3.3 @@ -418,14 +418,21 @@ 3.4 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3.5 AC_DEFUN_ONCE([BASIC_SETUP_PATHS], 3.6 [ 3.7 + # We get the top-level directory from the supporting wrappers. 3.8 + AC_MSG_CHECKING([for top-level directory]) 3.9 + AC_MSG_RESULT([$TOPDIR]) 3.10 + BASIC_FIXUP_PATH(TOPDIR) 3.11 + AC_SUBST(TOPDIR) 3.12 + 3.13 + # SRC_ROOT is a traditional alias for TOPDIR. 3.14 + SRC_ROOT=$TOPDIR 3.15 + 3.16 # Locate the directory of this script. 3.17 - SCRIPT="[$]0" 3.18 - AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L` 3.19 + AUTOCONF_DIR=$TOPDIR/common/autoconf 3.20 3.21 - # Where is the source? It is located two levels above the configure script. 3.22 + # Save the current directory this script was started from 3.23 CURDIR="$PWD" 3.24 - cd "$AUTOCONF_DIR/../.." 3.25 - SRC_ROOT="`$THEPWDCMD -L`" 3.26 + BASIC_FIXUP_PATH(CURDIR) 3.27 3.28 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 3.29 PATH_SEP=";" 3.30 @@ -433,13 +440,7 @@ 3.31 else 3.32 PATH_SEP=":" 3.33 fi 3.34 - 3.35 - AC_SUBST(SRC_ROOT) 3.36 AC_SUBST(PATH_SEP) 3.37 - cd "$CURDIR" 3.38 - 3.39 - BASIC_FIXUP_PATH(SRC_ROOT) 3.40 - BASIC_FIXUP_PATH(CURDIR) 3.41 3.42 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then 3.43 # Add extra search paths on solaris for utilities like ar and as etc... 3.44 @@ -493,13 +494,17 @@ 3.45 [ CONF_NAME=${with_conf_name} ]) 3.46 3.47 # Test from where we are running configure, in or outside of src root. 3.48 + AC_MSG_CHECKING([where to store configuration]) 3.49 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ 3.50 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ 3.51 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then 3.52 # We are running configure from the src root. 3.53 # Create a default ./build/target-variant-debuglevel output root. 3.54 if test "x${CONF_NAME}" = x; then 3.55 + AC_MSG_RESULT([in default location]) 3.56 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 3.57 + else 3.58 + AC_MSG_RESULT([in build directory with custom name]) 3.59 fi 3.60 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 3.61 $MKDIR -p "$OUTPUT_ROOT" 3.62 @@ -515,6 +520,7 @@ 3.63 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 3.64 fi 3.65 OUTPUT_ROOT="$CURDIR" 3.66 + AC_MSG_RESULT([in current directory]) 3.67 3.68 # WARNING: This might be a bad thing to do. You need to be sure you want to 3.69 # have a configuration in this directory. Do some sanity checks!
4.1 --- a/common/autoconf/compare.sh.in Tue Apr 10 07:46:25 2018 -0700 4.2 +++ b/common/autoconf/compare.sh.in Wed Apr 11 04:42:33 2018 -0700 4.3 @@ -1,6 +1,6 @@ 4.4 #!/bin/bash 4.5 # 4.6 -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 4.7 +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 4.8 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.9 # 4.10 # This code is free software; you can redistribute it and/or modify it 4.11 @@ -64,7 +64,7 @@ 4.12 UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200" 4.13 UNZIP="@UNZIP@" 4.14 4.15 -SRC_ROOT="@SRC_ROOT@" 4.16 +SRC_ROOT="@TOPDIR@" 4.17 4.18 if [ "$OPENJDK_TARGET_OS" = "windows" ]; then 4.19 PATH="@VS_PATH@"
5.1 --- a/common/autoconf/configure Tue Apr 10 07:46:25 2018 -0700 5.2 +++ b/common/autoconf/configure Wed Apr 11 04:42:33 2018 -0700 5.3 @@ -22,9 +22,9 @@ 5.4 # questions. 5.5 # 5.6 5.7 -if test "x$BASH_VERSION" = x; then 5.8 - echo This script needs bash to run. 5.9 - echo It is recommended to use the configure script in the source tree root instead. 5.10 +if test "x$1" != xCHECKME; then 5.11 + echo "This script cannot be run directly." 5.12 + echo "Use the 'configure' script in the top-level directory instead." 5.13 exit 1 5.14 fi 5.15 5.16 @@ -32,12 +32,19 @@ 5.17 export CONFIG_SHELL=$BASH 5.18 export _as_can_reexec=no 5.19 5.20 -conf_script_dir=`dirname $0` 5.21 +# Now the next argument is the absolute top-level directory path. 5.22 +# The TOPDIR variable is passed on to configure.ac. 5.23 +TOPDIR="$2" 5.24 +# Remove these two arguments to get to the user supplied arguments 5.25 +shift 5.26 +shift 5.27 + 5.28 +conf_script_dir="$TOPDIR/common/autoconf" 5.29 5.30 if [ "$CUSTOM_CONFIG_DIR" = "" ]; then 5.31 - conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf" 5.32 + conf_custom_script_dir="$TOPDIR/jdk/make/closed/autoconf" 5.33 else 5.34 - conf_custom_script_dir=$CUSTOM_CONFIG_DIR 5.35 + conf_custom_script_dir="$CUSTOM_CONFIG_DIR" 5.36 fi 5.37 5.38 ### 5.39 @@ -230,10 +237,10 @@ 5.40 ### 5.41 if test -e $conf_custom_script_dir/generated-configure.sh; then 5.42 # Custom source configure available; run that instead 5.43 - echo Running custom generated-configure.sh 5.44 + echo "Running custom generated-configure.sh" 5.45 conf_script_to_run=$conf_custom_script_dir/generated-configure.sh 5.46 else 5.47 - echo Running generated-configure.sh 5.48 + echo "Running generated-configure.sh" 5.49 conf_script_to_run=$conf_script_dir/generated-configure.sh 5.50 fi 5.51
6.1 --- a/common/autoconf/configure.ac Tue Apr 10 07:46:25 2018 -0700 6.2 +++ b/common/autoconf/configure.ac Wed Apr 11 04:42:33 2018 -0700 6.3 @@ -33,7 +33,7 @@ 6.4 AC_PREREQ([2.69]) 6.5 AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net) 6.6 6.7 -AC_CONFIG_AUX_DIR([build-aux]) 6.8 +AC_CONFIG_AUX_DIR([common/autoconf/build-aux]) 6.9 m4_include([build-aux/pkg.m4]) 6.10 6.11 # Include these first...
7.1 --- a/common/autoconf/generated-configure.sh Tue Apr 10 07:46:25 2018 -0700 7.2 +++ b/common/autoconf/generated-configure.sh Wed Apr 11 04:42:33 2018 -0700 7.3 @@ -1,3 +1,9 @@ 7.4 +#!/bin/bash 7.5 +# 7.6 +# ########################################################## 7.7 +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### 7.8 +# ########################################################## 7.9 +# 7.10 #! /bin/sh 7.11 # Guess values for system-dependent variables and create Makefiles. 7.12 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8. 7.13 @@ -882,7 +888,7 @@ 7.14 BUILD_LOG 7.15 SYS_ROOT 7.16 PATH_SEP 7.17 -SRC_ROOT 7.18 +TOPDIR 7.19 ZERO_ARCHDEF 7.20 DEFINE_CROSS_COMPILE_ARCH 7.21 LP64 7.22 @@ -3147,7 +3153,7 @@ 7.23 7.24 7.25 ac_aux_dir= 7.26 -for ac_dir in build-aux "$srcdir"/build-aux; do 7.27 +for ac_dir in common/autoconf/build-aux "$srcdir"/common/autoconf/build-aux; do 7.28 if test -f "$ac_dir/install-sh"; then 7.29 ac_aux_dir=$ac_dir 7.30 ac_install_sh="$ac_aux_dir/install-sh -c" 7.31 @@ -3163,7 +3169,7 @@ 7.32 fi 7.33 done 7.34 if test -z "$ac_aux_dir"; then 7.35 - as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 7.36 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in common/autoconf/build-aux \"$srcdir\"/common/autoconf/build-aux" "$LINENO" 5 7.37 fi 7.38 7.39 # These three variables are undocumented and unsupported, 7.40 @@ -4219,7 +4225,7 @@ 7.41 #CUSTOM_AUTOCONF_INCLUDE 7.42 7.43 # Do not change or remove the following line, it is needed for consistency checks: 7.44 -DATE_WHEN_GENERATED=1523371497 7.45 +DATE_WHEN_GENERATED=1523446931 7.46 7.47 ############################################################################### 7.48 # 7.49 @@ -13893,14 +13899,265 @@ 7.50 7.51 # Continue setting up basic stuff. Most remaining code require fundamental tools. 7.52 7.53 + # We get the top-level directory from the supporting wrappers. 7.54 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5 7.55 +$as_echo_n "checking for top-level directory... " >&6; } 7.56 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5 7.57 +$as_echo "$TOPDIR" >&6; } 7.58 + 7.59 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.60 + 7.61 + # Input might be given as Windows format, start by converting to 7.62 + # unix format. 7.63 + path="$TOPDIR" 7.64 + new_path=`$CYGPATH -u "$path"` 7.65 + 7.66 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7.67 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7.68 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7.69 + # "foo.exe" is OK but "foo" is an error. 7.70 + # 7.71 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 7.72 + # It is also a way to make sure we got the proper file name for the real test later on. 7.73 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7.74 + if test "x$test_shortpath" = x; then 7.75 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5 7.76 +$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;} 7.77 + as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5 7.78 + fi 7.79 + 7.80 + # Call helper function which possibly converts this using DOS-style short mode. 7.81 + # If so, the updated path is stored in $new_path. 7.82 + 7.83 + input_path="$new_path" 7.84 + # Check if we need to convert this using DOS-style short mode. If the path 7.85 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.86 + # take no chances and rewrite it. 7.87 + # Note: m4 eats our [], so we need to use [ and ] instead. 7.88 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7.89 + if test "x$has_forbidden_chars" != x; then 7.90 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.91 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7.92 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7.93 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7.94 + # Going to short mode and back again did indeed matter. Since short mode is 7.95 + # case insensitive, let's make it lowercase to improve readability. 7.96 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.97 + # Now convert it back to Unix-stile (cygpath) 7.98 + input_path=`$CYGPATH -u "$shortmode_path"` 7.99 + new_path="$input_path" 7.100 + fi 7.101 + fi 7.102 + 7.103 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7.104 + if test "x$test_cygdrive_prefix" = x; then 7.105 + # As a simple fix, exclude /usr/bin since it's not a real path. 7.106 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7.107 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7.108 + # a path prefixed by /cygdrive for fixpath to work. 7.109 + new_path="$CYGWIN_ROOT_PATH$input_path" 7.110 + fi 7.111 + fi 7.112 + 7.113 + 7.114 + if test "x$path" != "x$new_path"; then 7.115 + TOPDIR="$new_path" 7.116 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5 7.117 +$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;} 7.118 + fi 7.119 + 7.120 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.121 + 7.122 + path="$TOPDIR" 7.123 + has_colon=`$ECHO $path | $GREP ^.:` 7.124 + new_path="$path" 7.125 + if test "x$has_colon" = x; then 7.126 + # Not in mixed or Windows style, start by that. 7.127 + new_path=`cmd //c echo $path` 7.128 + fi 7.129 + 7.130 + 7.131 + input_path="$new_path" 7.132 + # Check if we need to convert this using DOS-style short mode. If the path 7.133 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.134 + # take no chances and rewrite it. 7.135 + # Note: m4 eats our [], so we need to use [ and ] instead. 7.136 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7.137 + if test "x$has_forbidden_chars" != x; then 7.138 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.139 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.140 + fi 7.141 + 7.142 + 7.143 + windows_path="$new_path" 7.144 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.145 + unix_path=`$CYGPATH -u "$windows_path"` 7.146 + new_path="$unix_path" 7.147 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.148 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7.149 + new_path="$unix_path" 7.150 + fi 7.151 + 7.152 + if test "x$path" != "x$new_path"; then 7.153 + TOPDIR="$new_path" 7.154 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5 7.155 +$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;} 7.156 + fi 7.157 + 7.158 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 7.159 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7.160 + 7.161 + else 7.162 + # We're on a posix platform. Hooray! :) 7.163 + path="$TOPDIR" 7.164 + has_space=`$ECHO "$path" | $GREP " "` 7.165 + if test "x$has_space" != x; then 7.166 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5 7.167 +$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;} 7.168 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7.169 + fi 7.170 + 7.171 + # Use eval to expand a potential ~ 7.172 + eval path="$path" 7.173 + if test ! -f "$path" && test ! -d "$path"; then 7.174 + as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7.175 + fi 7.176 + 7.177 + TOPDIR="`cd "$path"; $THEPWDCMD -L`" 7.178 + fi 7.179 + 7.180 + 7.181 + 7.182 + # SRC_ROOT is a traditional alias for TOPDIR. 7.183 + SRC_ROOT=$TOPDIR 7.184 + 7.185 # Locate the directory of this script. 7.186 - SCRIPT="$0" 7.187 - AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L` 7.188 - 7.189 - # Where is the source? It is located two levels above the configure script. 7.190 + AUTOCONF_DIR=$TOPDIR/common/autoconf 7.191 + 7.192 + # Save the current directory this script was started from 7.193 CURDIR="$PWD" 7.194 - cd "$AUTOCONF_DIR/../.." 7.195 - SRC_ROOT="`$THEPWDCMD -L`" 7.196 + 7.197 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.198 + 7.199 + # Input might be given as Windows format, start by converting to 7.200 + # unix format. 7.201 + path="$CURDIR" 7.202 + new_path=`$CYGPATH -u "$path"` 7.203 + 7.204 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7.205 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7.206 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7.207 + # "foo.exe" is OK but "foo" is an error. 7.208 + # 7.209 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 7.210 + # It is also a way to make sure we got the proper file name for the real test later on. 7.211 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7.212 + if test "x$test_shortpath" = x; then 7.213 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7.214 +$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7.215 + as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5 7.216 + fi 7.217 + 7.218 + # Call helper function which possibly converts this using DOS-style short mode. 7.219 + # If so, the updated path is stored in $new_path. 7.220 + 7.221 + input_path="$new_path" 7.222 + # Check if we need to convert this using DOS-style short mode. If the path 7.223 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.224 + # take no chances and rewrite it. 7.225 + # Note: m4 eats our [], so we need to use [ and ] instead. 7.226 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7.227 + if test "x$has_forbidden_chars" != x; then 7.228 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.229 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7.230 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7.231 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7.232 + # Going to short mode and back again did indeed matter. Since short mode is 7.233 + # case insensitive, let's make it lowercase to improve readability. 7.234 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.235 + # Now convert it back to Unix-stile (cygpath) 7.236 + input_path=`$CYGPATH -u "$shortmode_path"` 7.237 + new_path="$input_path" 7.238 + fi 7.239 + fi 7.240 + 7.241 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7.242 + if test "x$test_cygdrive_prefix" = x; then 7.243 + # As a simple fix, exclude /usr/bin since it's not a real path. 7.244 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7.245 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7.246 + # a path prefixed by /cygdrive for fixpath to work. 7.247 + new_path="$CYGWIN_ROOT_PATH$input_path" 7.248 + fi 7.249 + fi 7.250 + 7.251 + 7.252 + if test "x$path" != "x$new_path"; then 7.253 + CURDIR="$new_path" 7.254 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7.255 +$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7.256 + fi 7.257 + 7.258 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.259 + 7.260 + path="$CURDIR" 7.261 + has_colon=`$ECHO $path | $GREP ^.:` 7.262 + new_path="$path" 7.263 + if test "x$has_colon" = x; then 7.264 + # Not in mixed or Windows style, start by that. 7.265 + new_path=`cmd //c echo $path` 7.266 + fi 7.267 + 7.268 + 7.269 + input_path="$new_path" 7.270 + # Check if we need to convert this using DOS-style short mode. If the path 7.271 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.272 + # take no chances and rewrite it. 7.273 + # Note: m4 eats our [], so we need to use [ and ] instead. 7.274 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7.275 + if test "x$has_forbidden_chars" != x; then 7.276 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.277 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.278 + fi 7.279 + 7.280 + 7.281 + windows_path="$new_path" 7.282 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.283 + unix_path=`$CYGPATH -u "$windows_path"` 7.284 + new_path="$unix_path" 7.285 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.286 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7.287 + new_path="$unix_path" 7.288 + fi 7.289 + 7.290 + if test "x$path" != "x$new_path"; then 7.291 + CURDIR="$new_path" 7.292 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7.293 +$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7.294 + fi 7.295 + 7.296 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 7.297 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7.298 + 7.299 + else 7.300 + # We're on a posix platform. Hooray! :) 7.301 + path="$CURDIR" 7.302 + has_space=`$ECHO "$path" | $GREP " "` 7.303 + if test "x$has_space" != x; then 7.304 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7.305 +$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7.306 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7.307 + fi 7.308 + 7.309 + # Use eval to expand a potential ~ 7.310 + eval path="$path" 7.311 + if test ! -f "$path" && test ! -d "$path"; then 7.312 + as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7.313 + fi 7.314 + 7.315 + CURDIR="`cd "$path"; $THEPWDCMD -L`" 7.316 + fi 7.317 + 7.318 7.319 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 7.320 PATH_SEP=";" 7.321 @@ -13999,254 +14256,6 @@ 7.322 fi 7.323 7.324 7.325 - 7.326 - cd "$CURDIR" 7.327 - 7.328 - 7.329 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.330 - 7.331 - # Input might be given as Windows format, start by converting to 7.332 - # unix format. 7.333 - path="$SRC_ROOT" 7.334 - new_path=`$CYGPATH -u "$path"` 7.335 - 7.336 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7.337 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7.338 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7.339 - # "foo.exe" is OK but "foo" is an error. 7.340 - # 7.341 - # This test is therefore slightly more accurate than "test -f" to check for file precense. 7.342 - # It is also a way to make sure we got the proper file name for the real test later on. 7.343 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7.344 - if test "x$test_shortpath" = x; then 7.345 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7.346 -$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7.347 - as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5 7.348 - fi 7.349 - 7.350 - # Call helper function which possibly converts this using DOS-style short mode. 7.351 - # If so, the updated path is stored in $new_path. 7.352 - 7.353 - input_path="$new_path" 7.354 - # Check if we need to convert this using DOS-style short mode. If the path 7.355 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.356 - # take no chances and rewrite it. 7.357 - # Note: m4 eats our [], so we need to use [ and ] instead. 7.358 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7.359 - if test "x$has_forbidden_chars" != x; then 7.360 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.361 - shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7.362 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7.363 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7.364 - # Going to short mode and back again did indeed matter. Since short mode is 7.365 - # case insensitive, let's make it lowercase to improve readability. 7.366 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.367 - # Now convert it back to Unix-stile (cygpath) 7.368 - input_path=`$CYGPATH -u "$shortmode_path"` 7.369 - new_path="$input_path" 7.370 - fi 7.371 - fi 7.372 - 7.373 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7.374 - if test "x$test_cygdrive_prefix" = x; then 7.375 - # As a simple fix, exclude /usr/bin since it's not a real path. 7.376 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7.377 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7.378 - # a path prefixed by /cygdrive for fixpath to work. 7.379 - new_path="$CYGWIN_ROOT_PATH$input_path" 7.380 - fi 7.381 - fi 7.382 - 7.383 - 7.384 - if test "x$path" != "x$new_path"; then 7.385 - SRC_ROOT="$new_path" 7.386 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7.387 -$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7.388 - fi 7.389 - 7.390 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.391 - 7.392 - path="$SRC_ROOT" 7.393 - has_colon=`$ECHO $path | $GREP ^.:` 7.394 - new_path="$path" 7.395 - if test "x$has_colon" = x; then 7.396 - # Not in mixed or Windows style, start by that. 7.397 - new_path=`cmd //c echo $path` 7.398 - fi 7.399 - 7.400 - 7.401 - input_path="$new_path" 7.402 - # Check if we need to convert this using DOS-style short mode. If the path 7.403 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.404 - # take no chances and rewrite it. 7.405 - # Note: m4 eats our [], so we need to use [ and ] instead. 7.406 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7.407 - if test "x$has_forbidden_chars" != x; then 7.408 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.409 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.410 - fi 7.411 - 7.412 - 7.413 - windows_path="$new_path" 7.414 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.415 - unix_path=`$CYGPATH -u "$windows_path"` 7.416 - new_path="$unix_path" 7.417 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.418 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7.419 - new_path="$unix_path" 7.420 - fi 7.421 - 7.422 - if test "x$path" != "x$new_path"; then 7.423 - SRC_ROOT="$new_path" 7.424 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7.425 -$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7.426 - fi 7.427 - 7.428 - # Save the first 10 bytes of this path to the storage, so fixpath can work. 7.429 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7.430 - 7.431 - else 7.432 - # We're on a posix platform. Hooray! :) 7.433 - path="$SRC_ROOT" 7.434 - has_space=`$ECHO "$path" | $GREP " "` 7.435 - if test "x$has_space" != x; then 7.436 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7.437 -$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7.438 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7.439 - fi 7.440 - 7.441 - # Use eval to expand a potential ~ 7.442 - eval path="$path" 7.443 - if test ! -f "$path" && test ! -d "$path"; then 7.444 - as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 7.445 - fi 7.446 - 7.447 - SRC_ROOT="`cd "$path"; $THEPWDCMD -L`" 7.448 - fi 7.449 - 7.450 - 7.451 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.452 - 7.453 - # Input might be given as Windows format, start by converting to 7.454 - # unix format. 7.455 - path="$CURDIR" 7.456 - new_path=`$CYGPATH -u "$path"` 7.457 - 7.458 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7.459 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7.460 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7.461 - # "foo.exe" is OK but "foo" is an error. 7.462 - # 7.463 - # This test is therefore slightly more accurate than "test -f" to check for file precense. 7.464 - # It is also a way to make sure we got the proper file name for the real test later on. 7.465 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7.466 - if test "x$test_shortpath" = x; then 7.467 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7.468 -$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7.469 - as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5 7.470 - fi 7.471 - 7.472 - # Call helper function which possibly converts this using DOS-style short mode. 7.473 - # If so, the updated path is stored in $new_path. 7.474 - 7.475 - input_path="$new_path" 7.476 - # Check if we need to convert this using DOS-style short mode. If the path 7.477 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.478 - # take no chances and rewrite it. 7.479 - # Note: m4 eats our [], so we need to use [ and ] instead. 7.480 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7.481 - if test "x$has_forbidden_chars" != x; then 7.482 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.483 - shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7.484 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7.485 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7.486 - # Going to short mode and back again did indeed matter. Since short mode is 7.487 - # case insensitive, let's make it lowercase to improve readability. 7.488 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.489 - # Now convert it back to Unix-stile (cygpath) 7.490 - input_path=`$CYGPATH -u "$shortmode_path"` 7.491 - new_path="$input_path" 7.492 - fi 7.493 - fi 7.494 - 7.495 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7.496 - if test "x$test_cygdrive_prefix" = x; then 7.497 - # As a simple fix, exclude /usr/bin since it's not a real path. 7.498 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7.499 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7.500 - # a path prefixed by /cygdrive for fixpath to work. 7.501 - new_path="$CYGWIN_ROOT_PATH$input_path" 7.502 - fi 7.503 - fi 7.504 - 7.505 - 7.506 - if test "x$path" != "x$new_path"; then 7.507 - CURDIR="$new_path" 7.508 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7.509 -$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7.510 - fi 7.511 - 7.512 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.513 - 7.514 - path="$CURDIR" 7.515 - has_colon=`$ECHO $path | $GREP ^.:` 7.516 - new_path="$path" 7.517 - if test "x$has_colon" = x; then 7.518 - # Not in mixed or Windows style, start by that. 7.519 - new_path=`cmd //c echo $path` 7.520 - fi 7.521 - 7.522 - 7.523 - input_path="$new_path" 7.524 - # Check if we need to convert this using DOS-style short mode. If the path 7.525 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 7.526 - # take no chances and rewrite it. 7.527 - # Note: m4 eats our [], so we need to use [ and ] instead. 7.528 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7.529 - if test "x$has_forbidden_chars" != x; then 7.530 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7.531 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7.532 - fi 7.533 - 7.534 - 7.535 - windows_path="$new_path" 7.536 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7.537 - unix_path=`$CYGPATH -u "$windows_path"` 7.538 - new_path="$unix_path" 7.539 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7.540 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7.541 - new_path="$unix_path" 7.542 - fi 7.543 - 7.544 - if test "x$path" != "x$new_path"; then 7.545 - CURDIR="$new_path" 7.546 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7.547 -$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7.548 - fi 7.549 - 7.550 - # Save the first 10 bytes of this path to the storage, so fixpath can work. 7.551 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7.552 - 7.553 - else 7.554 - # We're on a posix platform. Hooray! :) 7.555 - path="$CURDIR" 7.556 - has_space=`$ECHO "$path" | $GREP " "` 7.557 - if test "x$has_space" != x; then 7.558 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7.559 -$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7.560 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7.561 - fi 7.562 - 7.563 - # Use eval to expand a potential ~ 7.564 - eval path="$path" 7.565 - if test ! -f "$path" && test ! -d "$path"; then 7.566 - as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7.567 - fi 7.568 - 7.569 - CURDIR="`cd "$path"; $THEPWDCMD -L`" 7.570 - fi 7.571 - 7.572 - 7.573 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then 7.574 # Add extra search paths on solaris for utilities like ar and as etc... 7.575 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" 7.576 @@ -14795,13 +14804,20 @@ 7.577 7.578 7.579 # Test from where we are running configure, in or outside of src root. 7.580 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5 7.581 +$as_echo_n "checking where to store configuration... " >&6; } 7.582 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ 7.583 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ 7.584 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then 7.585 # We are running configure from the src root. 7.586 # Create a default ./build/target-variant-debuglevel output root. 7.587 if test "x${CONF_NAME}" = x; then 7.588 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5 7.589 +$as_echo "in default location" >&6; } 7.590 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 7.591 + else 7.592 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5 7.593 +$as_echo "in build directory with custom name" >&6; } 7.594 fi 7.595 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 7.596 $MKDIR -p "$OUTPUT_ROOT" 7.597 @@ -14817,6 +14833,8 @@ 7.598 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 7.599 fi 7.600 OUTPUT_ROOT="$CURDIR" 7.601 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5 7.602 +$as_echo "in current directory" >&6; } 7.603 7.604 # WARNING: This might be a bad thing to do. You need to be sure you want to 7.605 # have a configuration in this directory. Do some sanity checks!
8.1 --- a/common/autoconf/spec.gmk.in Tue Apr 10 07:46:25 2018 -0700 8.2 +++ b/common/autoconf/spec.gmk.in Wed Apr 11 04:42:33 2018 -0700 8.3 @@ -68,8 +68,8 @@ 8.4 endif 8.5 8.6 # Specify where the common include directory for makefiles is. 8.7 -ifeq (,$(findstring -I @SRC_ROOT@/make/common,$(MAKE))) 8.8 - MAKE:=$(MAKE) -I @SRC_ROOT@/make/common 8.9 +ifeq (,$(findstring -I @TOPDIR@/make/common,$(MAKE))) 8.10 + MAKE:=$(MAKE) -I @TOPDIR@/make/common 8.11 endif 8.12 8.13 # The "human readable" name of this configuration 8.14 @@ -134,10 +134,13 @@ 8.15 SYS_ROOT:=@SYS_ROOT@ 8.16 8.17 # Paths to the source code 8.18 -SRC_ROOT:=@SRC_ROOT@ 8.19 ADD_SRC_ROOT:=@ADD_SRC_ROOT@ 8.20 OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@ 8.21 -TOPDIR:=@SRC_ROOT@ 8.22 + 8.23 +# The top-level directory of the forest (SRC_ROOT is a traditional alias) 8.24 +TOPDIR:=@TOPDIR@ 8.25 +SRC_ROOT:=@TOPDIR@ 8.26 + 8.27 OUTPUT_ROOT:=@OUTPUT_ROOT@ 8.28 JDK_TOPDIR:=@JDK_TOPDIR@ 8.29 LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
9.1 --- a/configure Tue Apr 10 07:46:25 2018 -0700 9.2 +++ b/configure Wed Apr 11 04:42:33 2018 -0700 9.3 @@ -1,6 +1,6 @@ 9.4 #!/bin/bash 9.5 # 9.6 -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 9.7 +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 9.8 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.9 # 9.10 # This code is free software; you can redistribute it and/or modify it 9.11 @@ -25,5 +25,10 @@ 9.12 # This is a thin wrapper which will call the real configure script, and 9.13 # make sure that is called using bash. 9.14 9.15 +# Get an absolute path to this script, since that determines the top-level directory. 9.16 this_script_dir=`dirname $0` 9.17 -bash $this_script_dir/common/autoconf/configure "$@" 9.18 +this_script_dir=`cd $this_script_dir > /dev/null && pwd` 9.19 + 9.20 +# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c. 9.21 +# This trick is needed to get autoconf to co-operate properly. 9.22 +bash -c ". $this_script_dir/common/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"