зеркало из https://github.com/mozilla/gecko-dev.git
Bug 241047 - Don't allow srcdir == objdir builds; r=ted
This commit is contained in:
Родитель
6f7607f758
Коммит
0c41ab1753
51
configure.in
51
configure.in
|
@ -86,27 +86,41 @@ dnl ========================================================
|
|||
MOZ_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 \`dirname $0\`; pwd`
|
||||
_objdir=`pwd`
|
||||
|
||||
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
|
||||
|
||||
|
||||
dnl TODO Don't exempt L10N builds once bug 842760 is resolved.
|
||||
if test "$_topsrcdir" = "$_objdir" -a "${with_l10n_base+set}" != set; then
|
||||
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 " *"
|
||||
echo " * If you are building with a mozconfig, you will need to change your"
|
||||
echo " * mozconfig to point to a different 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.
|
||||
*
|
||||
|
@ -115,9 +129,8 @@ then
|
|||
* 2. gmake distclean
|
||||
***
|
||||
EOF
|
||||
exit 1
|
||||
break
|
||||
fi
|
||||
exit 1
|
||||
break
|
||||
fi
|
||||
MOZ_BUILD_ROOT=`pwd`
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче