From a4bb56f3ef0dd61217f633ab4cced82cf25dc4a6 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 22 Feb 2014 08:49:04 +0000 Subject: [PATCH] Re: [PATCH 1/3] build: write version.stamp file containing $(VERSION) string --- 08/daf1038658bd9d37cc60eb6786ae6a96e90233 | 171 ++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 08/daf1038658bd9d37cc60eb6786ae6a96e90233 diff --git a/08/daf1038658bd9d37cc60eb6786ae6a96e90233 b/08/daf1038658bd9d37cc60eb6786ae6a96e90233 new file mode 100644 index 000000000..886b88306 --- /dev/null +++ b/08/daf1038658bd9d37cc60eb6786ae6a96e90233 @@ -0,0 +1,171 @@ +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 1E712431FB6 + for ; Sat, 22 Feb 2014 00:49:34 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, 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 ZyI7eCiADLr4 for ; + Sat, 22 Feb 2014 00:49:26 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D56D3431FBD + for ; Sat, 22 Feb 2014 00:49:25 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1WH8Gf-0004yy-Jp; Sat, 22 Feb 2014 08:49:21 +0000 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1WH8Gf-0006vR-2x; Sat, 22 Feb 2014 08:49:05 +0000 +From: Mark Walters +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/3] build: write version.stamp file containing $(VERSION) + string +In-Reply-To: <1393024837-30394-1-git-send-email-tomi.ollila@iki.fi> +References: <1393024837-30394-1-git-send-email-tomi.ollila@iki.fi> +User-Agent: Notmuch/0.15.2+484~gfb59956 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sat, 22 Feb 2014 08:49:04 +0000 +Message-ID: <8761o7mt1b.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 69668abbfd8a8890ebf51833d97cd925 (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: tomi.ollila@iki.fi +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: Sat, 22 Feb 2014 08:49:34 -0000 + + +Patches 2 and 3 look fine +1. + +I don't know any Make and haven't really being following the discussion +between Austin and Tomi so can't comment on Patch 1. It all seems to +work well in my testing. + +Best wishes + +Mark + + + +On Fri, 21 Feb 2014, Tomi Ollila wrote: +> This version file will be as prerequisite to the target files +> that use the version info for some purpose, like printing +> it for the user to examine. The contents of the version.stamp +> file is seldom read by the build system itself as the $(VERSION) +> variable has the same information. +> +> Thanks to Trevor, David and Mark for their contributions. +> --- +> +> This is version 6 of +> +> id:1391956711-21231-1-git-send-email-tomi.ollila@iki.fi +> +> The only change is $(VERSTAMP) -> version.stamp -- $(VERSTAMP) does not +> get expanded for prerequisities if those are not already defined, +> and as emacs/Makefile.local is included before Makefile.local $(VERSTAMP) +> is useless in emacs/... (expands to nothing). And my original idea for +> $(VERSTAMP) was for typo-checking -- I just did not realize that make does +> not tell me that the variable is undefined so the typo-check I thought of +> just did't happen. +> +> +> And the following 2 patches version 2 of +> +> id:1390135903-28167-1-git-send-email-tomi.ollila@iki.fi +> +> Now utilizes version.stamp to know when notmuch.el is to be +> re-bytecompiled. +> +> Makefile.local | 14 +++++++++++++- +> 1 file changed, 13 insertions(+), 1 deletion(-) +> +> diff --git a/Makefile.local b/Makefile.local +> index 174506c..3a56c06 100644 +> --- a/Makefile.local +> +++ b/Makefile.local +> @@ -22,6 +22,11 @@ VERSION:=$(shell cat ${srcdir}/version) +> ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),) +> ifeq ($(IS_GIT),yes) +> VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) +> +# Write the file 'version.stamp' in case its contents differ from $(VERSION) +> +FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs) +> +ifneq ($(FILE_VERSION),$(VERSION)) +> + $(shell echo "$(VERSION)" > version.stamp) +> +endif +> endif +> endif +> +> @@ -69,6 +74,11 @@ ifeq ($(shell cat .first-build-message 2>/dev/null),) +> endif +> endif +> +> +# Depend (also) on the file 'version'. In case of ifeq ($(IS_GIT),yes) +> +# this file may already have been updated. +> +version.stamp: version +> + echo $(VERSION) > $@ +> + +> $(TAR_FILE): +> if git tag -v $(VERSION) >/dev/null 2>&1; then \ +> ref=$(VERSION); \ +> @@ -280,6 +290,8 @@ notmuch_client_srcs = \ +> +> notmuch_client_modules = $(notmuch_client_srcs:.c=.o) +> +> +notmuch.o: version.stamp +> + +> notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a +> $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@ +> +> @@ -318,7 +330,7 @@ install-desktop: +> desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop +> +> SRCS := $(SRCS) $(notmuch_client_srcs) +> -CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc +> +CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) version.stamp +> +> DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config +> +> -- +> 1.8.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2