Discourage in-source autoconf builds (as we already do for the cmake build)

http://reviews.llvm.org/D7961

llvm-svn: 230812
This commit is contained in:
Jonathan Roelofs 2015-02-27 23:35:47 +00:00
parent 06671b00a3
commit 2a4b2c9a81
2 changed files with 11 additions and 0 deletions

View File

@ -73,6 +73,11 @@ if test ${srcdir} != "." ; then
fi fi
fi fi
dnl Quit if it is an in-source build
if test ${srcdir} == "." ; then
AC_MSG_ERROR([In-source builds are discouraged. Configure from a separate build directory.])
fi
dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS, dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc). dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
: ${CFLAGS=} : ${CFLAGS=}

6
configure vendored
View File

@ -1999,6 +1999,12 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;}
fi fi
fi fi
if test ${srcdir} == "." ; then
{ { echo "$as_me:$LINENO: error: In-source builds are discouraged. Configure from a separate build directory." >&5
echo "$as_me: error: In-source builds are discouraged. Configure from a separate build directory." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CFLAGS=} : ${CFLAGS=}
: ${CXXFLAGS=} : ${CXXFLAGS=}