qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables
Date: Tue, 21 Mar 2017 08:48:24 -0500	[thread overview]
Message-ID: <40cbe76c-dd10-06de-c87b-8111400c525e@redhat.com> (raw)
In-Reply-To: <87fuidzj02.fsf@dusky.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]

On 03/16/2017 04:08 AM, Markus Armbruster wrote:
> Sorry for chiming in late, I had missed this change.
> 
> Stefan Hajnoczi <stefanha@redhat.com> writes:
> 
>> From: "Daniel P. Berrange" <berrange@redhat.com>
>>
>> The only functional difference between the GENERATED_HEADERS
>> and GENERATED_SOURCES variables is that 'Makefile' has a
>> dependancy on GENERATED_HEADERS, causing generated header files
>> to be created immediatey at the start of the build process.
>> There is no reason why this early creation should be restricted
>> to the .h files, and not include .c files too.
> 
> Actually, there is.
> 
> Any prerequisites of Makefile are made even by make -n.  Restricting
> them to the ones make -n absolutely needs is good practice.

In fact, this is part of what tripped me up in trying to get to a root
cause in why modifying scripts/tracetool/format/h.py didn't cause
trace.h to be regenerated.  When trace.h is treated as a prerequisite of
Makefile, it's rules get run automatically and don't show up in 'make
--debug' output (you have to resort to the noisier 'make -d' to see that
the rule was run).

> 
> Generated headers must be prerequisites of Makefile, because automatic
> dependency generation may fail without them.
> 
> There is no such reason for generated non-headers.
> 
>>                                                Merge both of
>> the variables into a single GENERATED_FILES variable to make
>> it clear it is for any type of generated file.
> 
> I don't hate this quite enough for an outright NAK at this late stage.
> I do hate it enough to ask you to think about it once more.
> 
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-03-21 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  7:04 [Qemu-devel] [PULL 0/3] Tracing patches Stefan Hajnoczi
2017-03-16  7:04 ` [Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables Stefan Hajnoczi
2017-03-16  9:08   ` Markus Armbruster
2017-03-21 13:48     ` Eric Blake [this message]
2017-03-16  7:04 ` [Qemu-devel] [PULL 2/3] makefile: generate trace-events-all upfront Stefan Hajnoczi
2017-03-16  7:04 ` [Qemu-devel] [PULL 3/3] trace: ensure $(tracetool-y) is defined in top level makefile Stefan Hajnoczi
2017-03-16 15:31 ` [Qemu-devel] [PULL 0/3] Tracing patches Peter Maydell

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=40cbe76c-dd10-06de-c87b-8111400c525e@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).