Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / ed / 6883a6a0ef5503d572fe9bb45c436063226bf4
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 1497C431FC2\r
6         for <notmuch@notmuchmail.org>; Wed,  5 Feb 2014 14:58:46 -0800 (PST)\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 DSat-3xdRI-T for <notmuch@notmuchmail.org>;\r
16         Wed,  5 Feb 2014 14:58:42 -0800 (PST)\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 AB7AB431FAE\r
19         for <notmuch@notmuchmail.org>; Wed,  5 Feb 2014 14:58:42 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 9FF3910009D; Thu,  6 Feb 2014 00:58:34 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH v4] build: write VERSION file containing $(VERSION) string\r
25 Date: Thu,  6 Feb 2014 00:58:33 +0200\r
26 Message-Id: <1391641113-4669-1-git-send-email-tomi.ollila@iki.fi>\r
27 X-Mailer: git-send-email 1.8.0\r
28 In-Reply-To: <m261p4mkal.fsf@guru.guru-group.fi>\r
29 References: <m261p4mkal.fsf@guru.guru-group.fi>\r
30 Cc: tomi.ollila@iki.fi\r
31 X-BeenThere: notmuch@notmuchmail.org\r
32 X-Mailman-Version: 2.1.13\r
33 Precedence: list\r
34 List-Id: "Use and development of the notmuch mail system."\r
35         <notmuch.notmuchmail.org>\r
36 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
37         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
38 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
39 List-Post: <mailto:notmuch@notmuchmail.org>\r
40 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
41 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
43 X-List-Received-Date: Wed, 05 Feb 2014 22:58:46 -0000\r
44 \r
45 This version file will be as prerequisite to the target files\r
46 that use the version info for some purpose, like printing\r
47 it to the user to examine. The contents of the VERSION file\r
48 is seldom read by the build system itself as the $(VERSION)\r
49 variable has the same information.\r
50 ---\r
51 \r
52 ctested also with:\r
53        mv .git .x\r
54        make\r
55        cat VERSION version\r
56        mv .x .git\r
57        make\r
58        cat VERSION version\r
59 \r
60  Makefile.local | 17 +++++++++++++++--\r
61  1 file changed, 15 insertions(+), 2 deletions(-)\r
62 \r
63 diff --git a/Makefile.local b/Makefile.local\r
64 index 174506c..65c91cb 100644\r
65 --- a/Makefile.local\r
66 +++ b/Makefile.local\r
67 @@ -21,7 +21,13 @@ endif\r
68  VERSION:=$(shell cat ${srcdir}/version)\r
69  ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)\r
70  ifeq ($(IS_GIT),yes)\r
71 -VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)\r
72 +# Also write VERSION file in case its contents differ from $(VERSION)\r
73 +VERSION:=$(shell\\r
74 +       gv=`git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/`;\\r
75 +       test -f VERSION || touch VERSION;\\r
76 +       read fv < VERSION;\\r
77 +       test x"$$fv" = x"$$gv" || echo "$$gv" > VERSION;\\r
78 +       echo "$$gv")\r
79  endif\r
80  endif\r
81  \r
82 @@ -69,6 +75,11 @@ ifeq ($(shell cat .first-build-message 2>/dev/null),)\r
83  endif\r
84  endif\r
85  \r
86 +# Depend (also) on 'version' file. In case of ifeq ($(IS_GIT),yes)\r
87 +# this file may already have been updated.\r
88 +VERSION: version\r
89 +       echo $(VERSION) > $@\r
90 +\r
91  $(TAR_FILE):\r
92         if git tag -v $(VERSION) >/dev/null 2>&1; then \\r
93             ref=$(VERSION); \\r
94 @@ -280,6 +291,8 @@ notmuch_client_srcs =               \\r
95  \r
96  notmuch_client_modules = $(notmuch_client_srcs:.c=.o)\r
97  \r
98 +notmuch.o: VERSION\r
99 +\r
100  notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a\r
101         $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@\r
102  \r
103 @@ -318,7 +331,7 @@ install-desktop:\r
104         desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop\r
105  \r
106  SRCS  := $(SRCS) $(notmuch_client_srcs)\r
107 -CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc\r
108 +CLEAN := $(CLEAN) VERSION notmuch notmuch-shared $(notmuch_client_modules)\r
109  \r
110  DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config\r
111  \r
112 -- \r
113 1.8.4.2\r
114 \r