From 6063b2aa7b18e00a4ac900c3f67ebe7cd49f3a78 Mon Sep 17 00:00:00 2001 From: ihse Date: Thu, 27 Feb 2014 09:17:58 +0100 Subject: [PATCH] 8035825: Warn instead of fail when calling the configure wrapper directly Reviewed-by: dholmes, tbell --- common/autoconf/configure | 19 ++++++++++--------- common/autoconf/configure.ac | 2 +- common/autoconf/generated-configure.sh | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/common/autoconf/configure b/common/autoconf/configure index d64b9354d4..588a31cc42 100644 --- a/common/autoconf/configure +++ b/common/autoconf/configure @@ -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 diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac index 29b678a8ed..b9b374ca9c 100644 --- a/common/autoconf/configure.ac +++ b/common/autoconf/configure.ac @@ -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... diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 227c7fbbb0..9989385571 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -3162,7 +3162,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 @@ for ac_dir in common/autoconf/build-aux "$srcdir"/common/autoconf/build-aux; do 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 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++" #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 ############################################################################### # -- GitLab