unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Give a path name to mktemp in Makefile.local
@ 2011-12-17 15:36 Aaron Ecay
  2011-12-17 19:55 ` Tomi Ollila
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Aaron Ecay @ 2011-12-17 15:36 UTC (permalink / raw)
  To: notmuch

On some systems (incl. OS X 10.6), mktemp expects an argument giving it
the place to put the new temporary file.
---

On my machine without this patch, make prints a message from mktemp
about expecting an argument each time it is run.  At some point, make
got into a situation where it would print this message and exit cleanly,
but not build any changed files.  A "make clean" was necessary to kick
it into working again.

A disadvantage of this approach is that it drops an empty file into /tmp
on every make run.  It would be better to only create this file when
doing "make debian-snapshot", but I am not sure how to do that (cleanly;
my best idea is to put the build commands into a subshell and export an
environment variable for the temp file).  Any make/debian experts want
to take a stab?

 Makefile.local |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index c94402b..6eb4b18 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -139,7 +139,7 @@ pre-release:
 	mv $(TAR_FILE) $(DEB_TAR_FILE) releases
 
 .PHONY: debian-snapshot
-debian-snapshot: TMPFILE := $(shell mktemp)
+debian-snapshot: TMPFILE := $(shell mktemp /tmp/notmuch.XXXXXX)
 debian-snapshot:
 	make VERSION=$(VERSION) clean
 	cp debian/changelog $(TMPFILE)
-- 
1.7.8

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-18 10:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-17 15:36 [PATCH] Give a path name to mktemp in Makefile.local Aaron Ecay
2011-12-17 19:55 ` Tomi Ollila
2011-12-17 21:20 ` Jameson Graef Rollins
2011-12-17 23:21   ` Aaron Ecay
2011-12-18  3:16 ` [PATCH] build-system: use a shell variable for TMPFILE in debian-snapshot David Bremner
2011-12-18  8:48   ` Tomi Ollila
2011-12-18 10:46     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).