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

Nick Lewycky nicholas at mxc.ca
Sat Feb 28 22:01:21 PST 2015


Eric Christopher wrote:
>
>
> On Sat, Feb 28, 2015 at 11:45 AM Nick Lewycky <nicholas at mxc.ca
> <mailto: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
>     <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.

Hey, sorry. I was upset, and neither of you deserved that sort of tone. 
I'm truly sorry, and thank you for taking the time to write an 
explanation in spite of my poor attitude!

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

Got it.

If it matters, I've been using this configuration for a long time, and I 
haven't seen any glitch for years, though I do remember a time when that 
wasn't true. I understand why it risks continuing problems.

The two main things I get from in-tree builds are that I can grep 
through the source including the generated source, and that I can rename 
the directory trees. Out of tree builds bake in a directory name. I can 
try this again and see whether it's still a problem, or if there's 
something we can fix here.

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

Reducing support burden is a perfectly reasonable reason. As someone who 
uses this configuration, I find that I very rarely run make clean and 
don't think I've tried make distclean. I would not be surprised to learn 
that I've accidentally learned to avoid the things that don't work.

As you've probably already surmised, I'm not super interested in writing 
a patch that fixes "make distclean". :) Which I guess means that you can 
ignore me and un-revert? I do have one review comment though, please 
change the error message from "discouraged" to "are no longer 
supported". In part, I was confused by the combination of the term 
discouragement (in the error message and in the commit log) with a hard 
error.

Nick

>
> -eric
>
>
>      >
>      > http://reviews.llvm.org/D7961
>      >
>      > Modified:
>      >      llvm/trunk/autoconf/configure. ac <http://configure.ac>
>      >      llvm/trunk/configure
>      >
>      > Modified: llvm/trunk/autoconf/configure. ac <http://configure.ac>
>      > URL: http://llvm.org/viewvc/llvm- project/llvm/trunk/autoconf/
>     configure.ac?rev=230812&r1= 230811&r2=230812&view=diff
>     <http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=230812&r1=230811&r2=230812&view=diff>
>      > ============================== ==============================
>     ==================
>      > --- llvm/trunk/autoconf/configure. ac <http://configure.ac>
>     (original)
>      > +++ llvm/trunk/autoconf/configure. ac <http://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
>     <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 <mailto:llvm-commits at cs.uiuc.edu>
>      > http://lists.cs.uiuc.edu/ mailman/listinfo/llvm-commits
>     <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>      >
>




More information about the llvm-commits mailing list