<div dir="ltr"><br><br><div class="gmail_quote">On Sat, Feb 28, 2015 at 11:45 AM Nick Lewycky <<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jonathan Roelofs wrote:<br>
> Author: jroelofs<br>
> Date: Fri Feb 27 17:35:47 2015<br>
> New Revision: 230812<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230812&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=230812&view=rev</a><br>
> Log:<br>
> Discourage in-source autoconf builds (as we already do for the cmake build)<br>
<br>
I have reverted this patch. Please explain yourselves.<br></blockquote><div><br></div><div>Pretty rude way of putting it but sure.</div><div><br></div><div>Best practices.</div><div><br></div><div><a href="https://www.sourceware.org/autobook/autobook/autobook_14.html#SEC14">https://www.sourceware.org/autobook/autobook/autobook_14.html#SEC14</a><br></div><div><br></div><div>In general you want to keep your source directory pristine (readonly) and configuring inside the source directory is fraught with problems. This also ensures that the occasional report I get of someone not being able to do a make distclean in the source directory will go away. I will also take a working make distclean if you'd like to do that instead (though, obviously, I'd prefer the current patch).</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> <a href="http://reviews.llvm.org/D7961" target="_blank">http://reviews.llvm.org/D7961</a><br>
><br>
> Modified:<br>
>      llvm/trunk/autoconf/<a href="http://configure.ac" target="_blank">configure.<u></u>ac</a><br>
>      llvm/trunk/configure<br>
><br>
> Modified: llvm/trunk/autoconf/<a href="http://configure.ac" target="_blank">configure.<u></u>ac</a><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=230812&r1=230811&r2=230812&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/autoconf/<u></u>configure.ac?rev=230812&r1=<u></u>230811&r2=230812&view=diff</a><br>
> ==============================<u></u>==============================<u></u>==================<br>
> --- llvm/trunk/autoconf/<a href="http://configure.ac" target="_blank">configure.<u></u>ac</a> (original)<br>
> +++ llvm/trunk/autoconf/<a href="http://configure.ac" target="_blank">configure.<u></u>ac</a> Fri Feb 27 17:35:47 2015<br>
> @@ -73,6 +73,11 @@ if test ${srcdir} != "." ; then<br>
>     fi<br>
>   fi<br>
><br>
> +dnl Quit if it is an in-source build<br>
> +if test ${srcdir} == "." ; then<br>
> +  AC_MSG_ERROR([In-source builds are discouraged. Configure from a separate build directory.])<br>
> +fi<br>
> +<br>
>   dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,<br>
>   dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).<br>
>   : ${CFLAGS=}<br>
><br>
> Modified: llvm/trunk/configure<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=230812&r1=230811&r2=230812&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/configure?<u></u>rev=230812&r1=230811&r2=<u></u>230812&view=diff</a><br>
> ==============================<u></u>==============================<u></u>==================<br>
> --- llvm/trunk/configure (original)<br>
> +++ llvm/trunk/configure Fri Feb 27 17:35:47 2015<br>
> @@ -1999,6 +1999,12 @@ echo "$as_me: error: Already configured<br>
>     fi<br>
>   fi<br>
><br>
> +if test ${srcdir} == "." ; then<br>
> +  { { echo "$as_me:$LINENO: error: In-source builds are discouraged. Configure from a separate build directory.">&5<br>
> +echo "$as_me: error: In-source builds are discouraged. Configure from a separate build directory.">&2;}<br>
> +   { (exit 1); exit 1; }; }<br>
> +fi<br>
> +<br>
>   : ${CFLAGS=}<br>
>   : ${CXXFLAGS=}<br>
><br>
><br>
><br>
> ______________________________<u></u>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
><br>
<br>
</blockquote></div></div>