Skip to content

Commit 3c78a51

Browse files
committed
Discourage in-source autoconf builds (as we already do for the cmake build)
http://reviews.llvm.org/D7961 llvm-svn: 230812
1 parent 164350e commit 3c78a51

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

llvm/autoconf/configure.ac

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ if test ${srcdir} != "." ; then
7373
fi
7474
fi
7575

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

llvm/configure

+6
Original file line numberDiff line numberDiff line change
@@ -1999,6 +1999,12 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;}
19991999
fi
20002000
fi
20012001

2002+
if test ${srcdir} == "." ; then
2003+
{ { echo "$as_me:$LINENO: error: In-source builds are discouraged. Configure from a separate build directory." >&5
2004+
echo "$as_me: error: In-source builds are discouraged. Configure from a separate build directory." >&2;}
2005+
{ (exit 1); exit 1; }; }
2006+
fi
2007+
20022008
: ${CFLAGS=}
20032009
: ${CXXFLAGS=}
20042010

0 commit comments

Comments
 (0)