From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/4] rules.mak: cleanup config generation rules
Date: Tue, 15 Jan 2013 18:36:48 +0200 [thread overview]
Message-ID: <1d73c0f05575b77c8d67c8c131966ff9294c8650.1358267772.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1358267772.git.mst@redhat.com>
This addresses two issues with config generation
1. rule generating timestamp has side effect.
Thus cleanup on error does not work.
2. rule for handling timestamp is too generic.
It can create any missing .h file.
As a result when .h file is removed, build
might try to create it using this rule which
results in build errors.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
rules.mak | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/rules.mak b/rules.mak
index 6d82c0d..d11a5b4 100644
--- a/rules.mak
+++ b/rules.mak
@@ -82,12 +82,11 @@ TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
# Generate timestamp files for .h include files
-%.h: %.h-timestamp
- @test -f $@ || cp $< $@
+config-%.h: config-%.h-timestamp
+ @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%.h-timestamp: %.mak
- $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, " GEN $(TARGET_DIR)$*.h")
- @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
+config-%.h-timestamp: config-%.mak
+ $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, " GEN $(TARGET_DIR)config-$*.h")
# will delete the target of a rule if commands exit with a nonzero exit status
.DELETE_ON_ERROR:
--
MST
next prev 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 ` Michael S. Tsirkin [this message]
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 ` [Qemu-devel] [PATCH 2/4] Makefile: clean timestamp generation rule Michael S. Tsirkin
2013-01-17 10:31 ` 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=1d73c0f05575b77c8d67c8c131966ff9294c8650.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).