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

Jonathan Roelofs jonathan at codesourcery.com
Fri Feb 27 15:35:47 PST 2015


Author: jroelofs
Date: Fri Feb 27 17:35:47 2015
New Revision: 230812

URL: http://llvm.org/viewvc/llvm-project?rev=230812&view=rev
Log:
Discourage in-source autoconf builds (as we already do for the cmake build)

http://reviews.llvm.org/D7961

Modified:
    llvm/trunk/autoconf/configure.ac
    llvm/trunk/configure

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=230812&r1=230811&r2=230812&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Fri Feb 27 17:35:47 2015
@@ -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=}

Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=230812&r1=230811&r2=230812&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Fri Feb 27 17:35:47 2015
@@ -1999,6 +1999,12 @@ echo "$as_me: error: Already configured
   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=}
 





More information about the llvm-commits mailing list