8035825: Warn instead of fail when calling the configure wrapper directly
authorihse
Thu, 27 Feb 2014 09:17:58 +0100
changeset 22725 c382bed20726
parent 22724 072f729936a9
child 22726 d984085c5ff2
8035825: Warn instead of fail when calling the configure wrapper directly Reviewed-by: dholmes, tbell
common/autoconf/configure
common/autoconf/configure.ac
common/autoconf/generated-configure.sh
--- a/common/autoconf/configure	Tue Feb 25 15:19:32 2014 +0100
+++ b/common/autoconf/configure	Thu Feb 27 09:17:58 2014 +0100
@@ -23,18 +23,19 @@
 #
 
 if test "x$1" != xCHECKME; then
-  echo "This script cannot be run directly."
+  echo "WARNING: Calling the wrapper script directly is deprecated and unsupported."
+  echo "Not all features of configure will be available."
   echo "Use the 'configure' script in the top-level directory instead."
-  exit 1
+  TOPDIR=$(cd $(dirname $0)/../.. > /dev/null && pwd)
+else
+  # Now the next argument is the absolute top-level directory path.
+  # The TOPDIR variable is passed on to configure.ac.
+  TOPDIR="$2"
+  # Remove these two arguments to get to the user supplied arguments
+  shift
+  shift
 fi
 
-# Now the next argument is the absolute top-level directory path.
-# The TOPDIR variable is passed on to configure.ac.
-TOPDIR="$2"
-# Remove these two arguments to get to the user supplied arguments
-shift
-shift
-
 conf_script_dir="$TOPDIR/common/autoconf"
 
 if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
--- a/common/autoconf/configure.ac	Tue Feb 25 15:19:32 2014 +0100
+++ b/common/autoconf/configure.ac	Thu Feb 27 09:17:58 2014 +0100
@@ -33,7 +33,7 @@
 AC_PREREQ([2.69])
 AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
 
-AC_CONFIG_AUX_DIR([common/autoconf/build-aux])
+AC_CONFIG_AUX_DIR([$TOPDIR/common/autoconf/build-aux])
 m4_include([build-aux/pkg.m4])
 
 # Include these first...
--- a/common/autoconf/generated-configure.sh	Tue Feb 25 15:19:32 2014 +0100
+++ b/common/autoconf/generated-configure.sh	Thu Feb 27 09:17:58 2014 +0100
@@ -3162,7 +3162,7 @@
 
 
 ac_aux_dir=
-for ac_dir in common/autoconf/build-aux "$srcdir"/common/autoconf/build-aux; do
+for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
   if test -f "$ac_dir/install-sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -3178,7 +3178,7 @@
   fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in common/autoconf/build-aux \"$srcdir\"/common/autoconf/build-aux" "$LINENO" 5
+  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
 fi
 
 # These three variables are undocumented and unsupported,
@@ -4220,7 +4220,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1393327380
+DATE_WHEN_GENERATED=1393416124
 
 ###############################################################################
 #