All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: QEMU <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 02/12] build-sys: silence make by default
Date: Wed, 13 Dec 2017 12:30:41 +0100	[thread overview]
Message-ID: <CAJ+F1CJ4np6yn8-LcGW8uQScdv=6ocLY1GF=3+vXRP6ciXRk9w@mail.gmail.com> (raw)
In-Reply-To: <f632bd0e-66ad-2c90-3625-309cf99d5374@redhat.com>

Hi

On Fri, Dec 8, 2017 at 8:19 PM, Eric Blake <eblake@redhat.com> wrote:
> On 12/07/2017 06:58 PM, Marc-André Lureau wrote:
>> In particular, do not print anything when there is nothing to do, in
>> particular, after a successful build:
>
> Do we need both 'in particular'?
>

nope

>>
>> $ make
>> make[1]: '/home/elmarco/src/qemu/build/capstone/libcapstone.a' is up to date.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>  rules.mak | 5 +++++
>>  1 file changed, 5 insertions(+)
>
> Yay!  I've been bothered by this.
>
> You may want to add that the noise is conditional on whether you have
> capstone-devel installed.
>
> However,
>
>>
>> diff --git a/rules.mak b/rules.mak
>> index 6e943335f3..b760d54908 100644
>> --- a/rules.mak
>> +++ b/rules.mak
>> @@ -131,6 +131,11 @@ modules:
>>  # If called with only a single argument, will print nothing in quiet mode.
>>  quiet-command = $(if $(V),$1,$(if $(2),@printf "  %-7s %s\n" $2 $3 && $1, @$1))
>>
>> +makeflags_ = $(makeflags_0)
>> +makeflags_0 = --no-print-directory -s
>
> Why the mix of long option and short option? Would it be more legible to
> use two long options?
>
> In my testing of your patch, '-s' alone also silenced things
> (admittedly, when libcapstone.a is up-to-date).  What is
> --no-print-directory adding?
>
> /me goes digging
>
> Hmm, we already have this in Makefile:
>
> SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR)
>

Thanks I didn't notice.

> So maybe our problem is that we are forgetting to feed SUBDIR_MAKEFLAGS
> to our sub-make that builds libcapstone.a?

We do.

Now I wonder if this is really a good idea to merge "generic"
makeflags (silence etc) with qemu build-sys specifics (BUILD_DIR=..).
It seems we are lucky enough that capstone uses BUILDDIR and qemu
BUILD_DIR, so we avoided the conflict...

Perhaps it's a good time to switch and use thje genreic MAKEFLAGS in
rules.mk for V=.

> Next, why is -s silencing the "is up to date" message?  Per 'make
> --help', -s controls whether recipes are echoed - but that doesn't seem
> to be a recipe that was echoed.  Furthermore, the make manual mentions
> that -s is automatically added to MAKEFLAGS if it was present in the
> command line; are we accidentally silencing too much (if the user wants
> to do 'make -s V=1' to get JUST command lines but not the make noise)?

V=1 shouldn't add the flags, so I don't see the conflict in your example.

>
>> +makeflags_1 =
>> +MAKEFLAGS += $(makeflags_$(V))
>> +
>
> So I'm not yet convinced that this is the right place, or if it is too
> heavy of a hammer.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
>



-- 
Marc-André Lureau

  reply	other threads:[~2017-12-13 11:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  0:58 [Qemu-devel] [PATCH 00/12] Various build-sys and ASAN related fixes Marc-André Lureau
2017-12-08  0:58 ` [Qemu-devel] [PATCH 01/12] build-sys: fix qemu-ga -pthread linking Marc-André Lureau
2017-12-08  0:58 ` [Qemu-devel] [PATCH 02/12] build-sys: silence make by default Marc-André Lureau
2017-12-08 19:19   ` Eric Blake
2017-12-13 11:30     ` Marc-André Lureau [this message]
2017-12-08  0:58 ` [Qemu-devel] [PATCH 03/12] build-sys: add a rule to print a variable Marc-André Lureau
2017-12-08 19:21   ` Eric Blake
2017-12-08  0:58 ` [Qemu-devel] [PATCH 04/12] build-sys: add AddressSanitizer when --enable-debug if possible Marc-André Lureau
2017-12-08  0:58 ` [Qemu-devel] [PATCH 05/12] tests: fix check-qobject leak: Marc-André Lureau
2017-12-08 17:59   ` Markus Armbruster
2017-12-08  0:58 ` [Qemu-devel] [PATCH 06/12] vl: fix direct firmware directories leak Marc-André Lureau
2017-12-08  0:58 ` [Qemu-devel] [PATCH 07/12] readline: add a free function Marc-André Lureau
2017-12-08 10:05   ` Dr. David Alan Gilbert
2017-12-08  0:58 ` [Qemu-devel] [PATCH 08/12] tests: fix migration-test leak Marc-André Lureau
2017-12-08  9:57   ` Dr. David Alan Gilbert
2017-12-08  0:58 ` [Qemu-devel] [PATCH 09/12] crypto: fix stack-buffer-overflow error Marc-André Lureau
2017-12-08  9:49   ` Daniel P. Berrange
2017-12-08  0:58 ` [Qemu-devel] [PATCH 10/12] qemu-config: fix leak in query-command-line-options Marc-André Lureau
2017-12-08  0:58 ` [Qemu-devel] [PATCH 11/12] tests: fix qmp-test leak Marc-André Lureau
2017-12-08 18:01   ` Markus Armbruster
2017-12-08  0:58 ` [Qemu-devel] [PATCH 12/12] WIP ucontext: annotate coroutine stack for ASAN Marc-André Lureau
2017-12-08 13:38   ` Stefan Hajnoczi
2017-12-11 11:18     ` Marc-André Lureau
2017-12-11 11:31 ` [Qemu-devel] [PATCH 00/12] Various build-sys and ASAN related fixes no-reply
2017-12-11 11:34 ` no-reply
2017-12-11 12:25 ` no-reply

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='CAJ+F1CJ4np6yn8-LcGW8uQScdv=6ocLY1GF=3+vXRP6ciXRk9w@mail.gmail.com' \
    --to=marcandre.lureau@gmail.com \
    --cc=eblake@redhat.com \
    --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.