All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: "Andreas Färber" <afaerber@suse.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries
Date: Mon, 01 Jul 2013 17:20:42 +0200	[thread overview]
Message-ID: <51D19E4A.4050706@redhat.com> (raw)
In-Reply-To: <51D19AFA.2090707@msgid.tls.msk.ru>

Il 01/07/2013 17:06, Michael Tokarev ha scritto:
> So instead of this, we may have in the top-level Makefile:
> 
>   obj-i386-y += hw/i386/msi.o hw/i386/irq.o hw/i386/kvm.o
> 
> Or, if you prefer programmatic expansion,
> 
>   list-i386-y += msi.o irq.o kvm.o
>   obj-i386-y += $(addprefix hw/i386/, $(list-i386-y))

If I have to choose my poison, I prefer the directory multiple times.
But both seem worse than what we have now?

> So the difference is just the addition of the pathnames,
> not the logic or ifdeffery.

Even after you factor in user-level vs. softmmu, tools, KVM vs. Xen vs.
TCG, and all that?

>> Conflicts in a small file are also way easier to solve, even if there
>> are more conflicting files.
> 
> Conflicts?  Which conflicts?  You mean merge conflicts?
> If yes, it does not really matter be it small file or large
> file.

When diff3 goes haywire because you're merging features back to a
4-year-old version, it matters a lot.

> (Again, the "half" here refers to the fact that some variables
> gets prefixed by the subdir automatically while some doesn't).

Which *-obj-y variables do not get prefixed?

> So before sending patches, can we at least agree (or not) that
> specifying paths explicitly (either using dir/obj.o or by calling
> addprefix) is not THAT bad or it should be avoided entirely?

addprefix is bad.  Specifying paths explicitly is not bad _per se_, but
if a directory is used to group related code, I think the Makefile
should also be separated.  For example in the future we may have Kconfig
files in hw/*, and of these three possibilities, (1) and (2) would be
worse than (3):

1) use a single huge Kconfig file for all devices, use a single
Makefile.objs;

2) split Kconfig, keep a single Makefile.objs file;

3) split both the Kconfig and the Makefile.objs files.

> (I dislike the recursive sub-make approach because when you have
> everything in one make it is much easier to see all dependencies
> and plan the work, instead of running a ton of submakes first,
> each checking if its own subdir is up to date).

I agree.  And again QEMU is doing half-this half-that, but I don't see
any alternative.

Paolo

  reply	other threads:[~2013-07-01 15:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 17:34 [Qemu-devel] [RFC PATCH 0/4] per-object libraries Michael Tokarev
2013-06-18 17:34 ` [Qemu-devel] [RFC PATCH 1/4] build-sys: strip leading ./ from $(obj) Michael Tokarev
2013-06-18 17:34 ` [Qemu-devel] [RFC PATCH 2/4] build-sys: allow object-specific libraries to be used to link executables Michael Tokarev
2013-06-18 17:34 ` [Qemu-devel] [RFC PATCH 3/4] build-sys: allow per-object foo.cflags variables Michael Tokarev
2013-06-18 17:34 ` [Qemu-devel] [RFC PATCH 4/4] build-sys: move -lcurl out of libs and specify it for curl.o Michael Tokarev
2013-06-19  0:41 ` [Qemu-devel] [RFC PATCH 0/4] per-object libraries Michael Tokarev
2013-06-19 14:16 ` Stefan Hajnoczi
2013-06-19 14:58   ` Michael Tokarev
2013-06-19 16:46   ` Paolo Bonzini
2013-06-19 16:58 ` Paolo Bonzini
2013-06-19 18:18   ` Michael Tokarev
2013-06-19 18:52     ` Paolo Bonzini
2013-06-19 19:31       ` Richard Henderson
     [not found]         ` <51C2D03E.2030505@redhat.com>
2013-06-20 10:06           ` Peter Maydell
2013-06-20 12:39             ` Paolo Bonzini
2013-06-20 12:50               ` Peter Maydell
2013-06-20 17:09           ` Richard Henderson
2013-06-19 20:00       ` Michael Tokarev
2013-06-20 10:09         ` Paolo Bonzini
2013-06-30 15:23   ` Michael Tokarev
2013-07-01 10:08     ` Paolo Bonzini
2013-07-01 10:10       ` Michael Tokarev
2013-07-01 10:18         ` Paolo Bonzini
2013-06-30 15:28 ` Andreas Färber
2013-06-30 15:36   ` Michael Tokarev
2013-06-30 15:51     ` Peter Maydell
2013-06-30 16:49       ` Michael Tokarev
2013-07-01  8:00         ` Stefan Hajnoczi
2013-06-30 15:56     ` Andreas Färber
2013-07-01 13:39     ` Paolo Bonzini
2013-07-01 14:43       ` Michael Tokarev
2013-07-01 14:46         ` Andreas Färber
2013-07-01 14:52           ` Michael Tokarev
2013-07-01 14:53           ` Paolo Bonzini
2013-07-01 15:06             ` Michael Tokarev
2013-07-01 15:20               ` Paolo Bonzini [this message]
2013-07-01 15:52                 ` Michael Tokarev

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=51D19E4A.4050706@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=mjt@tls.msk.ru \
    --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.