8187543: Replace SRC_ROOT with TOPDIR

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2017-09-25 10:21:23 +02:00
parent 97d93fe4d8
commit 4ef785b337
6 changed files with 24 additions and 29 deletions

View File

@ -568,8 +568,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
# We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
BASIC_FIXUP_PATH(CURDIR)
BASIC_FIXUP_PATH(TOPDIR)
# SRC_ROOT is a traditional alias for TOPDIR.
SRC_ROOT=$TOPDIR
# Calculate a canonical version of TOPDIR for string comparisons
CANONICAL_TOPDIR=$TOPDIR
@ -770,13 +768,13 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
[ CONF_NAME=${with_conf_name} ])
AC_ARG_WITH(output-base-dir, [AS_HELP_STRING([--with-output-base-dir],
[override the default output base directory @<:@./build@:>@])],
[ OUTPUT_BASE=${with_output_base_dir} ], [ OUTPUT_BASE="$SRC_ROOT/build" ] )
[ OUTPUT_BASE=${with_output_base_dir} ], [ OUTPUT_BASE="$TOPDIR/build" ] )
# Test from where we are running configure, in or outside of src root.
AC_MSG_CHECKING([where to store configuration])
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
|| test "x$CURDIR" = "x$SRC_ROOT/make/autoconf" \
|| test "x$CURDIR" = "x$SRC_ROOT/make" ; then
if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$TOPDIR/common" \
|| test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
|| test "x$CURDIR" = "x$TOPDIR/make" ; then
# We are running configure from the src root.
# Create a default ./build/target-variant-debuglevel output root.
if test "x${CONF_NAME}" = x; then
@ -796,7 +794,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
# If configuration is situated in normal build directory, just use the build
# directory name as configuration name, otherwise use the complete path.
if test "x${CONF_NAME}" = x; then
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
fi
OUTPUT_ROOT="$CURDIR"
AC_MSG_RESULT([in current directory])
@ -822,7 +820,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
AC_MSG_NOTICE([seriously mess up just about everything.])
AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure])
AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
fi
@ -1173,7 +1171,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
[
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
file_to_test="$SRC_ROOT/LICENSE"
file_to_test="$TOPDIR/LICENSE"
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
fi

View File

@ -382,7 +382,7 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
FIXPATH=
if test "x$OPENJDK_BUILD_OS" = xwindows; then
AC_MSG_CHECKING([if fixpath can be created])
FIXPATH_SRC="$SRC_ROOT/make/src/native/fixpath.c"
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then

View File

@ -69,7 +69,7 @@ export UNIQ="@UNIQ@"
export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200"
export UNARCHIVE="@UNZIP@ -q -o"
export SRC_ROOT="@TOPDIR@"
export TOPDIR="@TOPDIR@"
export OUTPUT_ROOT="@OUTPUT_ROOT@"
if [ "@COMPILE_TYPE@" != "cross" ]; then
@ -88,7 +88,7 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
fi
# Now locate the main script and run it.
REAL_COMPARE_SCRIPT="$SRC_ROOT/make/scripts/compare.sh"
REAL_COMPARE_SCRIPT="$TOPDIR/make/scripts/compare.sh"
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
exit 1
@ -100,4 +100,4 @@ $MV $OUTPUT_ROOT/compare.log $OUTPUT_ROOT/compare.log.old 2> /dev/null
export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
$BASH $SRC_ROOT/make/scripts/logger.sh $OUTPUT_ROOT/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
$BASH $TOPDIR/make/scripts/logger.sh $OUTPUT_ROOT/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"

View File

@ -5116,7 +5116,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1506027115
DATE_WHEN_GENERATED=1506327629
###############################################################################
#
@ -16804,8 +16804,6 @@ $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid."
fi
fi
# SRC_ROOT is a traditional alias for TOPDIR.
SRC_ROOT=$TOPDIR
# Calculate a canonical version of TOPDIR for string comparisons
CANONICAL_TOPDIR=$TOPDIR
@ -17559,16 +17557,16 @@ fi
if test "${with_output_base_dir+set}" = set; then :
withval=$with_output_base_dir; OUTPUT_BASE=${with_output_base_dir}
else
OUTPUT_BASE="$SRC_ROOT/build"
OUTPUT_BASE="$TOPDIR/build"
fi
# Test from where we are running configure, in or outside of src root.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
$as_echo_n "checking where to store configuration... " >&6; }
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
|| test "x$CURDIR" = "x$SRC_ROOT/make/autoconf" \
|| test "x$CURDIR" = "x$SRC_ROOT/make" ; then
if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$TOPDIR/common" \
|| test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
|| test "x$CURDIR" = "x$TOPDIR/make" ; then
# We are running configure from the src root.
# Create a default ./build/target-variant-debuglevel output root.
if test "x${CONF_NAME}" = x; then
@ -17590,7 +17588,7 @@ $as_echo "in build directory with custom name" >&6; }
# If configuration is situated in normal build directory, just use the build
# directory name as configuration name, otherwise use the complete path.
if test "x${CONF_NAME}" = x; then
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
fi
OUTPUT_ROOT="$CURDIR"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
@ -17622,8 +17620,8 @@ $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<c
$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
$as_echo "$as_me: seriously mess up just about everything." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $TOPDIR' and restart configure" >&5
$as_echo "$as_me: Try 'cd $TOPDIR' and restart configure" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
@ -54146,7 +54144,7 @@ $as_echo "no" >&6; }
if test "x$OPENJDK_BUILD_OS" = xwindows; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
$as_echo_n "checking if fixpath can be created... " >&6; }
FIXPATH_SRC="$SRC_ROOT/make/src/native/fixpath.c"
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
@ -67516,7 +67514,7 @@ $as_echo "no" >&6; }
# Check for some common pitfalls
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
file_to_test="$SRC_ROOT/LICENSE"
file_to_test="$TOPDIR/LICENSE"
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
fi

View File

@ -125,12 +125,11 @@ endif
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
SYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
# The top-level directory of the forest (SRC_ROOT is a traditional alias)
# The top-level directory of the source repository
TOPDIR:=@TOPDIR@
# These two versions of TOPDIR are used in string comparisons
ORIGINAL_TOPDIR:=@ORIGINAL_TOPDIR@
CANONICAL_TOPDIR:=@CANONICAL_TOPDIR@
SRC_ROOT:=@TOPDIR@
OUTPUT_ROOT:=@OUTPUT_ROOT@

View File

@ -29,7 +29,7 @@
################################################################################
# Check that we are run via the wrapper generated by configure
if [ -z "$SRC_ROOT" ]; then
if [ -z "$TOPDIR" ]; then
echo "Error: You must run this script using build/[conf]/compare.sh"
exit 1
fi
@ -56,7 +56,7 @@ else
STAT_PRINT_SIZE="-c %s"
fi
COMPARE_EXCEPTIONS_INCLUDE="$SRC_ROOT/make/scripts/compare_exceptions.sh.incl"
COMPARE_EXCEPTIONS_INCLUDE="$TOPDIR/make/scripts/compare_exceptions.sh.incl"
if [ ! -e "$COMPARE_EXCEPTIONS_INCLUDE" ]; then
echo "Error: Cannot locate the exceptions file, it should have been here: $COMPARE_EXCEPTIONS_INCLUDE"
exit 1