qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Alexandre Raymond <cerbere@gmail.com>
Cc: qemu-trivial@nongnu.org, Qemu Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] Makefile: distclean should clean all possible targets
Date: Wed, 27 Jul 2011 07:57:38 +0200	[thread overview]
Message-ID: <m3k4b4z2nh.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <CAHWZs7UG9NrAQKAtJN2+eQtbOOGFZrotdfSg3PhQ+FD_mRX4-w@mail.gmail.com> (Alexandre Raymond's message of "Tue, 26 Jul 2011 09:51:21 -0400")

Alexandre Raymond <cerbere@gmail.com> writes:

> Hi Markus,
>
>> Well, I'd expect distclean to remove exactly what *this* makefile can
>> build, and leave everything else alone.
>
> I was expecting "distclean" to bring back the source directory to
> however it was after checkout, removing anything that might have been
> created by the build/configure process.
>
>
>> Your patch adds a special case to that simple rule: also remove
>> not-configured target directories.  Other not-configured stuff is still
>> left behind.
>>
>> Special cases need special justification, hence my question above.
>
> This patch stems from the discussion in "Makefile: fix out-of-tree builds"
> http://lists.gnu.org/archive/html/qemu-devel/2011-07/msg02707.html
>
> What happens is that SRC_PATH is set in the VPATH variable in the
> Makefile, which causes it to search for files inside the source
> directory (and outside the current build directory).
>
> Say you're building out-of-tree, and the Makefile happens to pick up
> old files from your main source directory, it can lead to errors in
> the build. If you are "unable" to delete old build data because you've
> run a more restricted "configure" after an earlier build, this earlier
> build data will not go away if you distclean.
>
> For example:
[...]

There are many more object files that are built conditionally.  Why is
it okay not to delete them?

If you unwisely messed up your source tree by building in it, a simple
and reliable way out is to git-clone yourself a new one.  Or if you
insist on recovering in-place, remove files outside .git that aren't in
git.


  reply	other threads:[~2011-07-27  5:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26  3:56 [Qemu-trivial] [PATCH 0/2] Minor makefile fixes Alexandre Raymond
2011-07-26  3:56 ` [Qemu-trivial] [PATCH 1/2] Makefile: distclean should clean all possible targets Alexandre Raymond
2011-07-26  6:47   ` [Qemu-trivial] [Qemu-devel] " Markus Armbruster
2011-07-26 13:51     ` Alexandre Raymond
2011-07-27  5:57       ` Markus Armbruster [this message]
2011-07-27 13:55         ` Alexandre Raymond
2011-07-27 14:42           ` Michael Roth
2011-07-29 11:20             ` [Qemu-trivial] " Paolo Bonzini
2011-07-26  3:56 ` [Qemu-trivial] [PATCH 2/2] Makefile: delete config.log in distclean Alexandre Raymond
2011-07-29 11:07   ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k4b4z2nh.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=cerbere@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).