8035825: Warn instead of fail when calling the configure wrapper directly

Wed, 11 Apr 2018 09:36:13 -0700

author
kevinw
date
Wed, 11 Apr 2018 09:36:13 -0700
changeset 2213
5510b933fa58
parent 2212
dd97daafa80b
child 2214
fda76d0c4b84

8035825: Warn instead of fail when calling the configure wrapper directly
Reviewed-by: ihse, dholmes, tbell

common/autoconf/configure file | annotate | diff | comparison | revisions
common/autoconf/configure.ac file | annotate | diff | comparison | revisions
common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/configure	Wed Apr 11 04:42:33 2018 -0700
     1.2 +++ b/common/autoconf/configure	Wed Apr 11 09:36:13 2018 -0700
     1.3 @@ -23,22 +23,23 @@
     1.4  #
     1.5  
     1.6  if test "x$1" != xCHECKME; then
     1.7 -  echo "This script cannot be run directly."
     1.8 +  echo "WARNING: Calling the wrapper script directly is deprecated and unsupported."
     1.9 +  echo "Not all features of configure will be available."
    1.10    echo "Use the 'configure' script in the top-level directory instead."
    1.11 -  exit 1
    1.12 +  TOPDIR=$(cd $(dirname $0)/../.. > /dev/null && pwd)
    1.13 +else
    1.14 +  # Now the next argument is the absolute top-level directory path.
    1.15 +  # The TOPDIR variable is passed on to configure.ac.
    1.16 +  TOPDIR="$2"
    1.17 +  # Remove these two arguments to get to the user supplied arguments
    1.18 +  shift
    1.19 +  shift
    1.20  fi
    1.21  
    1.22  # Force autoconf to use bash. This also means we must disable autoconf re-exec.
    1.23  export CONFIG_SHELL=$BASH
    1.24  export _as_can_reexec=no
    1.25  
    1.26 -# Now the next argument is the absolute top-level directory path.
    1.27 -# The TOPDIR variable is passed on to configure.ac.
    1.28 -TOPDIR="$2"
    1.29 -# Remove these two arguments to get to the user supplied arguments
    1.30 -shift
    1.31 -shift
    1.32 -
    1.33  conf_script_dir="$TOPDIR/common/autoconf"
    1.34  
    1.35  if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
     2.1 --- a/common/autoconf/configure.ac	Wed Apr 11 04:42:33 2018 -0700
     2.2 +++ b/common/autoconf/configure.ac	Wed Apr 11 09:36:13 2018 -0700
     2.3 @@ -33,7 +33,7 @@
     2.4  AC_PREREQ([2.69])
     2.5  AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
     2.6  
     2.7 -AC_CONFIG_AUX_DIR([common/autoconf/build-aux])
     2.8 +AC_CONFIG_AUX_DIR([$TOPDIR/common/autoconf/build-aux])
     2.9  m4_include([build-aux/pkg.m4])
    2.10  
    2.11  # Include these first...
     3.1 --- a/common/autoconf/generated-configure.sh	Wed Apr 11 04:42:33 2018 -0700
     3.2 +++ b/common/autoconf/generated-configure.sh	Wed Apr 11 09:36:13 2018 -0700
     3.3 @@ -3153,7 +3153,7 @@
     3.4  
     3.5  
     3.6  ac_aux_dir=
     3.7 -for ac_dir in common/autoconf/build-aux "$srcdir"/common/autoconf/build-aux; do
     3.8 +for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
     3.9    if test -f "$ac_dir/install-sh"; then
    3.10      ac_aux_dir=$ac_dir
    3.11      ac_install_sh="$ac_aux_dir/install-sh -c"
    3.12 @@ -3169,7 +3169,7 @@
    3.13    fi
    3.14  done
    3.15  if test -z "$ac_aux_dir"; then
    3.16 -  as_fn_error $? "cannot find install-sh, install.sh, or shtool in common/autoconf/build-aux \"$srcdir\"/common/autoconf/build-aux" "$LINENO" 5
    3.17 +  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
    3.18  fi
    3.19  
    3.20  # These three variables are undocumented and unsupported,
    3.21 @@ -4225,7 +4225,7 @@
    3.22  #CUSTOM_AUTOCONF_INCLUDE
    3.23  
    3.24  # Do not change or remove the following line, it is needed for consistency checks:
    3.25 -DATE_WHEN_GENERATED=1523446931
    3.26 +DATE_WHEN_GENERATED=1523447858
    3.27  
    3.28  ###############################################################################
    3.29  #

mercurial