diff options
author | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-02-27 23:35:47 +0000 |
---|---|---|
committer | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-02-27 23:35:47 +0000 |
commit | 3c78a513e629d47c4081b51e86c72ad0f40ab4ca (patch) | |
tree | 99a70419b6298633ba0cc4b31f549921167407f8 | |
parent | 164350e2ea2acf360921e892979fa59be67fd72f (diff) | |
download | bcm5719-llvm-3c78a513e629d47c4081b51e86c72ad0f40ab4ca.tar.gz bcm5719-llvm-3c78a513e629d47c4081b51e86c72ad0f40ab4ca.zip |
Discourage in-source autoconf builds (as we already do for the cmake build)
http://reviews.llvm.org/D7961
llvm-svn: 230812
-rw-r--r-- | llvm/autoconf/configure.ac | 5 | ||||
-rwxr-xr-x | llvm/configure | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac index e0bc78310c9..807de559036 100644 --- a/llvm/autoconf/configure.ac +++ b/llvm/autoconf/configure.ac @@ -73,6 +73,11 @@ if test ${srcdir} != "." ; then 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 instead of the autoconf default (for example, '-g -O2' for CC=gcc). : ${CFLAGS=} diff --git a/llvm/configure b/llvm/configure index cac9bf6533a..29437550f0d 100755 --- a/llvm/configure +++ b/llvm/configure @@ -1999,6 +1999,12 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;} 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=} : ${CXXFLAGS=} |