qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] Makefile: distclean should c


From: Markus Armbruster
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Alexandre Raymond <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]