unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] Give a path name to mktemp in Makefile.local
Date: Sat, 17 Dec 2011 10:36:25 -0500	[thread overview]
Message-ID: <1324136185-4509-1-git-send-email-aaronecay@gmail.com> (raw)

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

             reply	other threads:[~2011-12-17 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17 15:36 Aaron Ecay [this message]
2011-12-17 19:55 ` [PATCH] Give a path name to mktemp in Makefile.local 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

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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1324136185-4509-1-git-send-email-aaronecay@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=notmuch@notmuchmail.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.
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).