From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: linux-rt-users@vger.kernel.org
Cc: Clark Williams <williams@redhat.com>
Subject: [PATCH 3/3] Makefile: don't use temporary files in generation of dependency files
Date: Wed, 24 Feb 2010 17:58:08 +0100 [thread overview]
Message-ID: <1267030688-12244-3-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20100224165611.GA22159@pengutronix.de>
These temporary files were a real problem when creating the Debian
package for rt-tests. debhelper (a generic suite of scripts to ease
packaging) did something like:
perl -c 'close(STDERR); exec("make distclean");'
which leaked the *.d.$$ files and then wailed that the package contained
untracked changes to the vanilla source. See
http://bugs.debian.org/570443 for some more details.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Makefile | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 99fbba4..5bb8774 100644
--- a/Makefile
+++ b/Makefile
@@ -43,10 +43,7 @@ VPATH += src/lib
# Pattern rule to generate dependency files from .c files
%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
+ @$(CC) -MM $(CFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@ || rm -f $@
.PHONY: all
all: $(TARGETS) hwlatdetect
--
1.6.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-02-24 16:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 16:56 [PATCH 0/3] rt-tests patches Uwe Kleine-König
2010-02-24 16:58 ` [PATCH 1/3] trivial: s/specifed/specified/ Uwe Kleine-König
2010-03-01 19:32 ` John Kacur
2010-02-24 16:58 ` [PATCH 2/3] install backfire.c to $(srcdir)/backfire/ Uwe Kleine-König
2010-03-01 19:32 ` John Kacur
2010-03-01 20:04 ` Uwe Kleine-König
2010-02-24 16:58 ` Uwe Kleine-König [this message]
2010-03-01 19:39 ` [PATCH 3/3] Makefile: don't use temporary files in generation of dependency files John Kacur
2010-03-01 20:11 ` Uwe Kleine-König
2010-03-01 20:50 ` John Kacur
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=1267030688-12244-3-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@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).