[llvm] r230812 - Discourage in-source autoconf builds (as we already do for the cmake build)
Eric Christopher
echristo at gmail.com
Tue Mar 24 18:08:18 PDT 2015
On Tue, Mar 10, 2015 at 9:39 AM Jonathan Roelofs <jonathan at codesourcery.com>
wrote:
>
>
> On 2/28/15 11:01 PM, Nick Lewycky wrote:
> > 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!
> Sorry about my end of this too. I had assumed there was consensus on
> this from discussing it on #llvm. I probably should have mailed the list
> first explaining what I had intended to do.
> >
> >> 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.
> +1
>
> This is a small step toward allowing the source dir to be kept readonly
> during builds.
> >
> > 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,
> This one you can work around (somewhat) by doing a
> subdirectory-of-source build, i.e.:
>
> $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
> $ mkdir -p llvm/build && cd llvm/build
> $ ../configure [options]
>
> > and that I can rename
> > the directory trees. Out of tree builds bake in a directory name.
> Doesn't this just mean that renames have to happen in two steps (i.e.
> rename the src version of the dir, then rename the build version of the
> dir)? Or is there something fundamentally different here that I'm missing?
> > 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
> :) Especially with the whole "autotools is going away once we have
> feature parity with the cmake build" push.
> > 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.
> Sorry about that... how about "In-source builds are not allowed. Please
> configure from a separate build directory."? This would better match the
> message printed by the cmake build in this situation.
>
>
This works for me. Nick?
-eric
>
> Cheers,
>
> Jon
> >
> > 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>
> >> >
> >>
> >
>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150325/e64619c7/attachment.html>
More information about the llvm-commits
mailing list