cf: Remove SRCDIR_PARENT

The SRCDIR_PARENT shell variable is set to the configure process current
working directory. It is used during configure to set the top level
directory variables used in the build; TOP_OBJDIR, TOP_INCDIR,
TOP_LIBDIR. It is also used during configure to specify the path to
generated programs.

However, this variable is redundant with the TOP_OBJDIR variable and the
name can be confusing, since the top build directory is not the source
parent directory when doing out-of-tree (objdir) builds.

Remove the SRCDIR_PARENT variable and set the top directory variables
early in configure. Use TOP_OBJDIR to indicate the path to generated
tools.

Change-Id: Iaf1ce7707e73dd3c8fdf849c9767e8b84401d5a7
Reviewed-on: https://gerrit.openafs.org/15816
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Michael Meffie 2024-08-13 14:00:24 -04:00
parent 76ae0225ac
commit 2e39bea08f
5 changed files with 10 additions and 11 deletions

View File

@ -11,7 +11,7 @@ AC_PROG_CC
OPENAFS_AUTOHEADER_TOP
OPENAFS_AUTOHEADER_BOTTOM
SRCDIR_PARENT=`pwd`
OPENAFS_TOPDIRS
#BOZO_SAVE_CORES pam
OPENAFS_OPTIONS
@ -74,7 +74,6 @@ OPENAFS_YET_MORE_OPTION_TESTS
OPENAFS_OUTPUT_VARIABLES
OPENAFS_FUSE
OPENAFS_SWIG
OPENAFS_TOPDIRS
OPENAFS_CROSSTOOLS
OPENAFS_LINT
OPENAFS_CRYPT_CHECKS

View File

@ -8,9 +8,9 @@ if test "x$with_crosstools_dir" != "x"; then
AC_MSG_ERROR(Tools not found in $with_crosstools_dir)
fi
else
COMPILE_ET_PATH="${SRCDIR_PARENT}/src/comerr/compile_et"
CONFIGTOOL_PATH="${SRCDIR_PARENT}/src/config/config"
RXGEN_PATH="${SRCDIR_PARENT}/src/rxgen/rxgen"
COMPILE_ET_PATH="${TOP_OBJDIR}/src/comerr/compile_et"
CONFIGTOOL_PATH="${TOP_OBJDIR}/src/config/config"
RXGEN_PATH="${TOP_OBJDIR}/src/rxgen/rxgen"
fi
AC_SUBST(COMPILE_ET_PATH)
AC_SUBST(CONFIGTOOL_PATH)

View File

@ -24,8 +24,8 @@ $2
MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
_ACEOF
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir $SPARSE_MAKEFLAGS modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir $SPARSE_MAKEFLAGS modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
echo make -C $LINUX_KERNEL_BUILD M=$TOP_OBJDIR/conftest.dir $SPARSE_MAKEFLAGS modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
make -C $LINUX_KERNEL_BUILD M=$TOP_OBJDIR/conftest.dir $SPARSE_MAKEFLAGS modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
! grep -i "WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then [$3]
else

View File

@ -449,6 +449,6 @@ esac
# Set the `make dest` target destination path.
#
if test "x${DEST}" = "x"; then
DEST="${SRCDIR_PARENT}/${AFS_SYSNAME}/dest"
DEST="${TOP_OBJDIR}/${AFS_SYSNAME}/dest"
fi
])

View File

@ -11,7 +11,7 @@ case $TOP_SRCDIR in
;;
esac
TOP_OBJDIR="${SRCDIR_PARENT}"
TOP_INCDIR="${SRCDIR_PARENT}/include"
TOP_LIBDIR="${SRCDIR_PARENT}/lib"
TOP_OBJDIR=`pwd`
TOP_INCDIR="${TOP_OBJDIR}/include"
TOP_LIBDIR="${TOP_OBJDIR}/lib"
])