[PATCH] Give a path name to mktemp in Makefile.local

Aaron Ecay aaronecay at gmail.com
Sat Dec 17 07:36:25 PST 2011


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



More information about the notmuch mailing list