qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/4] Makefile: clean timestamp generation rule
Date: Tue, 15 Jan 2013 18:36:56 +0200	[thread overview]
Message-ID: <cd254b55ebe9233ff7003a760cc85682189d84cb.1358267772.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1358267772.git.mst@redhat.com>

create timestamp by rule without sideeffects.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 trace/Makefile.objs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 27fe26b..dde9d57 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -4,24 +4,24 @@
 # Auto-generated header for tracing routines
 
 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
+	@cmp -s $< $@ || cp $< $@
 $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
 	$(call quiet-command,$(TRACETOOL) \
 		--format=h \
 		--backend=$(TRACE_BACKEND) \
 		< $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
-	@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
 
 ######################################################################
 # Auto-generated tracing routines (non-DTrace)
 
 ifneq ($(TRACE_BACKEND),dtrace)
 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
+	@cmp -s $< $@ || cp $< $@
 $(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
 	$(call quiet-command,$(TRACETOOL) \
 		--format=c \
 		--backend=$(TRACE_BACKEND) \
 		< $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
-	@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
 
 $(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
 endif
-- 
MST

  parent reply	other threads:[~2013-01-15 16:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 16:36 [Qemu-devel] [PATCH 0/4] qemu timestamp and related makefile cleanups Michael S. Tsirkin
2013-01-15 16:36 ` [Qemu-devel] [PATCH 1/4] rules.mak: cleanup config generation rules Michael S. Tsirkin
2013-01-15 16:36 ` [Qemu-devel] [PATCH 4/4] Makefile: fix make clean on libcacard Michael S. Tsirkin
2013-01-17 10:33   ` Stefan Hajnoczi
2013-01-17 10:50     ` Michael S. Tsirkin
2013-01-18 13:28       ` Stefan Hajnoczi
2013-01-15 16:36 ` [Qemu-devel] [PATCH 3/4] rules/mak: make clean should blow away timestamp files Michael S. Tsirkin
2013-01-17 10:28   ` Stefan Hajnoczi
2013-01-17 10:48     ` Michael S. Tsirkin
2013-01-18 13:27       ` Stefan Hajnoczi
2013-01-15 16:36 ` Michael S. Tsirkin [this message]
2013-01-17 10:31   ` [Qemu-devel] [PATCH 2/4] Makefile: clean timestamp generation rule Stefan Hajnoczi

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=cd254b55ebe9233ff7003a760cc85682189d84cb.1358267772.git.mst@redhat.com \
    --to=mst@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 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).