Re: [PATCH v2] emacs: Allow part preferences to depend on message content.
[notmuch-archives.git] / 03 / c85b5e0401d2eabcfcbc538bf34ba187fdb5ae
1 Return-Path: <too@guru-group.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id C6FC7431FBF\r
6         for <notmuch@notmuchmail.org>; Sun, 23 Mar 2014 00:19:30 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id o35SDy1EUv1N for <notmuch@notmuchmail.org>;\r
16         Sun, 23 Mar 2014 00:19:26 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id A28AF431FBC\r
19         for <notmuch@notmuchmail.org>; Sun, 23 Mar 2014 00:19:26 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id EF4DE1000FA; Sun, 23 Mar 2014 09:19:14 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH v4 1/3] build: write version.stamp file containing $(VERSION)\r
25         string\r
26 Date: Wed, 19 Mar 2014 22:37:09 +0200\r
27 Message-Id: <1395261431-24668-1b-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.8.0\r
29 In-Reply-To: <1395261431-24668-1-git-send-email-tomi.ollila@iki.fi>\r
30 References: <1395261431-24668-1-git-send-email-tomi.ollila@iki.fi>\r
31 Cc: tomi.ollila@iki.fi\r
32 X-BeenThere: notmuch@notmuchmail.org\r
33 X-Mailman-Version: 2.1.13\r
34 Precedence: list\r
35 List-Id: "Use and development of the notmuch mail system."\r
36         <notmuch.notmuchmail.org>\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
40 List-Post: <mailto:notmuch@notmuchmail.org>\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
44 X-List-Received-Date: Sun, 23 Mar 2014 07:19:30 -0000\r
45 \r
46 This version file will be as prerequisite to the target files\r
47 that use the version info for some purpose, like printing\r
48 it for the user to examine. The contents of the version.stamp\r
49 file is seldom read by the build system itself as the $(VERSION)\r
50 variable has the same information.\r
51 \r
52 Thanks to Trevor, David and Mark for their contributions.\r
53 ---\r
54 \r
55 change since *-1-*: $(srcdir) added to version.stamp: version line\r
56 \r
57  .gitignore     |  1 +\r
58  Makefile.local | 14 +++++++++++++-\r
59  2 files changed, 14 insertions(+), 1 deletion(-)\r
60 \r
61 diff --git a/.gitignore b/.gitignore\r
62 index ef4f074..1fb3a71 100644\r
63 --- a/.gitignore\r
64 +++ b/.gitignore\r
65 @@ -1,5 +1,6 @@\r
66  .first-build-message\r
67  Makefile.config\r
68 +version.stamp\r
69  TAGS\r
70  tags\r
71  *cscope*\r
72 diff --git a/Makefile.local b/Makefile.local\r
73 index cb7b106..9ad554d 100644\r
74 --- a/Makefile.local\r
75 +++ b/Makefile.local\r
76 @@ -22,6 +22,11 @@ VERSION:=$(shell cat ${srcdir}/version)\r
77  ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)\r
78  ifeq ($(IS_GIT),yes)\r
79  VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)\r
80 +# Write the file 'version.stamp' in case its contents differ from $(VERSION)\r
81 +FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)\r
82 +ifneq ($(FILE_VERSION),$(VERSION))\r
83 +       $(shell echo "$(VERSION)" > version.stamp)\r
84 +endif\r
85  endif\r
86  endif\r
87  \r
88 @@ -69,6 +74,11 @@ ifeq ($(shell cat .first-build-message 2>/dev/null),)\r
89  endif\r
90  endif\r
91  \r
92 +# Depend (also) on the file 'version'. In case of ifeq ($(IS_GIT),yes)\r
93 +# this file may already have been updated.\r
94 +version.stamp: $(srcdir)/version\r
95 +       echo $(VERSION) > $@\r
96 +\r
97  $(TAR_FILE):\r
98         if git tag -v $(VERSION) >/dev/null 2>&1; then \\r
99             ref=$(VERSION); \\r
100 @@ -280,6 +290,8 @@ notmuch_client_srcs =               \\r
101  \r
102  notmuch_client_modules = $(notmuch_client_srcs:.c=.o)\r
103  \r
104 +notmuch.o: version.stamp\r
105 +\r
106  notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a\r
107         $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@\r
108  \r
109 @@ -318,7 +330,7 @@ install-desktop:\r
110         desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop\r
111  \r
112  SRCS  := $(SRCS) $(notmuch_client_srcs)\r
113 -CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc\r
114 +CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) version.stamp\r
115  \r
116  DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config\r
117  \r
118 -- \r
119 1.8.0\r
120 \r