qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 2/2] trace: avoid unnecessary recompilation if nothing changed
Date: Mon, 27 Sep 2010 18:16:55 +0200	[thread overview]
Message-ID: <4CA0C377.2080806@redhat.com> (raw)
In-Reply-To: <AANLkTimPYni2UHVqu0D5TbY7jnAYbdYXRNN-H6bqL2tt@mail.gmail.com>

On 09/27/2010 06:13 PM, Blue Swirl wrote:
>> Indeed, see how it's done for config-*.h.
>>
>> # Uses generic rule in rules.mak
>> trace.h: trace.h-timestamp
>> trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
>>         $(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h<  $<  >  $@,"  GEN  trace.h)
>>         @cmp $@ trace.h>/dev/null 2>&1 || cp $@ trace.h
>>
>> (untested).
>
> I just copied the rule from %/config-devices.mak. Is also that rule
> then incorrect?

config-devices.mak will cause the Makefile to be reread, but no 
recompilations, so it's fine not to use a timestamp file.  Headers are 
more complicated.

> Perhaps there could be a macro for this, not unlike move-if-change
> script in various GNU packages?

The problem is not really the move-if-change script, but rather the 
timestamping rules.  You can use $(eval) for that but it quickly becomes 
unmanageable.

Paolo

  reply	other threads:[~2010-09-27 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26  9:05 [Qemu-devel] [PATCH 2/2] trace: avoid unnecessary recompilation if nothing changed Blue Swirl
2010-09-26 16:15 ` Stefan Hajnoczi
2010-09-27  8:32 ` Markus Armbruster
2010-09-27  9:51   ` [Qemu-devel] " Paolo Bonzini
2010-09-27 16:13     ` Blue Swirl
2010-09-27 16:16       ` Paolo Bonzini [this message]
2010-09-28  8:58   ` [Qemu-devel] " Markus Armbruster
2010-09-29 11:42     ` [Qemu-devel] " Paolo Bonzini

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=4CA0C377.2080806@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.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 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).