From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH] make: remove generated objects from target dirs
Date: Sun, 4 Mar 2012 18:49:03 +0200 [thread overview]
Message-ID: <20120304164902.GB15384@redhat.com> (raw)
In-Reply-To: <4F539242.8010605@suse.de>
On Sun, Mar 04, 2012 at 05:03:14PM +0100, Andreas Färber wrote:
> Am 04.03.2012 10:10, schrieb Michael S. Tsirkin:
> > I ended up with qmp-commands.h in target directories,
> > which makes build fail as it is found before the
> > main header.
> > make clean fixes it, but it might get triggered
> > again when we make some header target-independent next.
> > It's easy to just make sure all such leftovers are
> > removed, so let's do this.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > diff --git a/Makefile b/Makefile
> > index e66e885..958a414 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -89,6 +89,7 @@ qemu-options.def: $(SRC_PATH)/qemu-options.hx
> > SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
> >
> > subdir-%: $(GENERATED_HEADERS)
> > + $(call quiet-command,rm -f $(foreach header, $(GENERATED_HEADERS), "$*/$(header)"),)
>
> Nack. While this happens to fix an issue you encountered this is just
> plain wrong and dangerous. It takes a list of currently generated
> headers in the main directory and deletes them in all target folders on
> every compile; it's not forbidden to have a header of the same name in
> both directories, whether generated or not.
Yes it is Forbidden. With a big F.
And the reason is that it will break the build
in a very confusing way.
So if you do this silly thing, you pay the price, and this
is way better than everyone who tries to build the tree pays the price.
> I am all for making make clean do what it claims though.
>
> The real solution to this problem would be to make sure by careful
> review not to move files around in such a conflicting way (rename them
> instead)
Too late for current tree. There are many such conflicts.
> rather than posting a note to please run make clean or make
> distclean (which is fine if you have to do it once, bothersome for
> multiple repos, and unhelpful for bisecting).
>
> Andreas
This means that a file name that was generated somewhere in the
hierarchy at any point in the past can never be generated again
anywhere else.
That's impractical.
> > $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
> >
> > ifneq ($(wildcard config-host.mak),)
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2012-03-04 16:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 9:10 [Qemu-devel] [PATCH] make: remove generated objects from target dirs Michael S. Tsirkin
2012-03-04 13:25 ` Peter Maydell
2012-03-04 13:31 ` Michael S. Tsirkin
2012-03-04 13:44 ` Peter Maydell
2012-03-04 14:13 ` Michael S. Tsirkin
2012-03-04 16:03 ` Andreas Färber
2012-03-04 16:49 ` Michael S. Tsirkin [this message]
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=20120304164902.GB15384@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.