mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Configure wrapper checks if source directory moved
This commit is contained in:
parent
6b356d464d
commit
ffdf9e7474
1 changed files with 23 additions and 2 deletions
25
configure
vendored
25
configure
vendored
|
@ -164,8 +164,29 @@ while [ $# -ne 0 ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create build directory
|
if [ -d $builddir ]; then
|
||||||
mkdir -p $builddir
|
# If build directory exists, check if it has a CMake cache
|
||||||
|
if [ -f $builddir/CMakeCache.txt ]; then
|
||||||
|
# If the Cmake cache exists, then check that it thinks
|
||||||
|
# the source tree exists where it's currently located
|
||||||
|
cmakehomedir=`grep CMAKE_HOME_DIRECTORY $builddir/CMakeCache.txt | \
|
||||||
|
sed 's/CMAKE_HOME_DIRECTORY:INTERNAL=//g'`
|
||||||
|
if [ "$cmakehomedir" != "$sourcedir" ]; then
|
||||||
|
# The source tree moved since the build was last configured
|
||||||
|
echo "\
|
||||||
|
The source tree has been moved from:
|
||||||
|
$cmakehomedir
|
||||||
|
to:
|
||||||
|
$sourcedir
|
||||||
|
To reconfigure in the new source directory, please delete:
|
||||||
|
$builddir/CMakeCache.txt" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Create build directory
|
||||||
|
mkdir -p $builddir
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Build Directory : $builddir"
|
echo "Build Directory : $builddir"
|
||||||
echo "Source Directory: $sourcedir"
|
echo "Source Directory: $sourcedir"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue