Bug 1007788 - Disallow in-source builds for js/src, same as the main m-c tree. r=glandium

This commit is contained in:
Ian Stakenvicius 2014-05-08 13:22:46 -04:00
parent c0b6487997
commit df5859dc66

View File

@ -71,27 +71,36 @@ dnl ========================================================
USE_PTHREADS=
_PTHREAD_LDFLAGS=""
dnl Do not allow a separate objdir build if a srcdir build exists.
dnl Do not allow objdir == srcdir builds
dnl ==============================================================
_topsrcdir=`cd $srcdir; pwd`
_objdir=`pwd`
if test "$_topsrcdir" != "$_objdir"
if test "$_topsrcdir" = "$_objdir"
then
# Check for a couple representative files in the source tree
_conflict_files=
for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
if test -f $file; then
_conflict_files="$_conflict_files $file"
fi
echo " ***"
echo " * Building directly in the main source directory is not allowed."
echo " *"
echo " * To build, you must run configure from a separate directory"
echo " * (referred to as an object directory)."
echo " ***"
exit 1
fi
# Check for a couple representative files in the source tree
_conflict_files=
for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
if test -f $file; then
_conflict_files="$_conflict_files $file"
fi
done
if test "$_conflict_files"; then
echo "***"
echo "* Your source tree contains these files:"
for file in $_conflict_files; do
echo "* $file"
done
if test "$_conflict_files"; then
echo "***"
echo "* Your source tree contains these files:"
for file in $_conflict_files; do
echo "* $file"
done
cat 1>&2 <<-EOF
cat 1>&2 <<-EOF
* This indicates that you previously built in the source tree.
* A source tree build can confuse the separate objdir build.
*
@ -100,9 +109,8 @@ then
* 2. gmake distclean
***
EOF
exit 1
break
fi
exit 1
break
fi
MOZ_BUILD_ROOT=`pwd`