From 396c1490ef1e97986183828179a75eba16b92a72 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 18 Dec 2011 23:16:51 +2000 Subject: [PATCH 1/1] [PATCH] build-system: use a shell variable for TMPFILE in debian-snapshot --- 7b/3003034d01077f1e71836ac0d4dc4e2cc60584 | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 7b/3003034d01077f1e71836ac0d4dc4e2cc60584 diff --git a/7b/3003034d01077f1e71836ac0d4dc4e2cc60584 b/7b/3003034d01077f1e71836ac0d4dc4e2cc60584 new file mode 100644 index 000000000..63ae8070e --- /dev/null +++ b/7b/3003034d01077f1e71836ac0d4dc4e2cc60584 @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id BEDAF431FD0 + for ; Sat, 17 Dec 2011 19:17:07 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 59jHbzbZz8ci for ; + Sat, 17 Dec 2011 19:17:07 -0800 (PST) +Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2F6F9431FB6 + for ; Sat, 17 Dec 2011 19:17:07 -0800 (PST) +Received: from zancas.localnet + (fctnnbsc36w-156034079193.pppoe-dynamic.High-Speed.nb.bellaliant.net + [156.34.79.193]) (authenticated bits=0) + by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pBI3GuC0027762 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); + Sat, 17 Dec 2011 23:17:02 -0400 +Received: from bremner by zancas.localnet with local (Exim 4.77) + (envelope-from ) + id 1Rc7FA-00080L-7i; Sat, 17 Dec 2011 23:16:56 -0400 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH] build-system: use a shell variable for TMPFILE in + debian-snapshot +Date: Sat, 17 Dec 2011 23:16:51 -0400 +Message-Id: <1324178211-30739-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.7.7.3 +In-Reply-To: <1324136185-4509-1-git-send-email-aaronecay@gmail.com> +References: <1324136185-4509-1-git-send-email-aaronecay@gmail.com> +Cc: David Bremner +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 18 Dec 2011 03:17:08 -0000 + +From: David Bremner + +Aaron Ecay points out in +id:"1324136185-4509-1-git-send-email-aaronecay@gmail.com" that the +mktemp in + + debian-snapshot: TMPFILE := $(shell mktemp) + +Is being evaluated for every target. As best I can tell, this is +because make is evaluating the right hand side, even though it is not +doing the assignment. + +Of course, it isn't quite as nice to edit with the line continuations, +but it is ideomatic make. +--- + Makefile.local | 15 ++++++++------- + 1 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/Makefile.local b/Makefile.local +index 5108a0c..97f397f 100644 +--- a/Makefile.local ++++ b/Makefile.local +@@ -139,15 +139,16 @@ pre-release: + mv $(TAR_FILE) $(DEB_TAR_FILE) releases + + .PHONY: debian-snapshot +-debian-snapshot: TMPFILE := $(shell mktemp) + debian-snapshot: + make VERSION=$(VERSION) clean +- cp debian/changelog $(TMPFILE) +- EDITOR=/bin/true dch -b -v $(VERSION)+1 -D UNRELEASED 'test build, not for upload' +- echo '3.0 (native)' > debian/source/format +- debuild -us -uc +- mv -f $(TMPFILE) debian/changelog +- echo '3.0 (quilt)' > debian/source/format ++ TMPFILE=$$(mktemp /tmp/notmuch.XXXXXX); \ ++ cp debian/changelog $${TMPFILE}; \ ++ EDITOR=/bin/true dch -b -v $(VERSION)+1 \ ++ -D UNRELEASED 'test build, not for upload'; \ ++ echo '3.0 (native)' > debian/source/format; \ ++ debuild -us -uc; \ ++ mv -f $${TMPFILE} debian/changelog; \ ++ echo '3.0 (quilt)' > debian/source/format + + .PHONY: release-message + release-message: +-- +1.7.7.3 + -- 2.26.2