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

Eric Christopher echristo at gmail.com
Sat Feb 28 13:08:07 PST 2015


On Sat, Feb 28, 2015 at 11:45 AM Nick Lewycky <nicholas at mxc.ca> wrote:

> Jonathan Roelofs wrote:
> > 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)
>
> I have reverted this patch. Please explain yourselves.
>

Pretty rude way of putting it but sure.

Best practices.

https://www.sourceware.org/autobook/autobook/autobook_14.html#SEC14

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).

-eric


>
> >
> > 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=}
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150228/b0c9c07e/attachment.html>


More information about the llvm-commits mailing list