Re: How does notmuch track mails?
[notmuch-archives.git] / 86 / a46400d578c460607c9f6a91c5414dbd1f2a61
1 Return-Path: <bgamari.foss@gmail.com>\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 B2AB0431FAE\r
6         for <notmuch@notmuchmail.org>; Wed, 20 Jan 2010 12:35:32 -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: -2.811\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.811 tagged_above=-999 required=5\r
12         tests=[AWL=-0.212, BAYES_00=-2.599] autolearn=unavailable\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 wgTDxpvo7a7B for <notmuch@notmuchmail.org>;\r
16         Wed, 20 Jan 2010 12:35:32 -0800 (PST)\r
17 Received: from mail-bw0-f215.google.com (mail-bw0-f215.google.com\r
18         [209.85.218.215])\r
19         by olra.theworths.org (Postfix) with ESMTP id 5AB91431FBC\r
20         for <notmuch@notmuchmail.org>; Wed, 20 Jan 2010 12:35:32 -0800 (PST)\r
21 Received: by bwz7 with SMTP id 7so1734929bwz.6\r
22         for <notmuch@notmuchmail.org>; Wed, 20 Jan 2010 12:35:30 -0800 (PST)\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
24         h=domainkey-signature:received:received:from:to:cc:subject:date\r
25         :message-id:x-mailer:in-reply-to:references;\r
26         bh=+cjhbz8ueXz538umGsqN1MMcwXgiZtjYlx6k9PU+S2E=;\r
27         b=vUhyBa1glRmTWmUJjLVb3bq5xmHfnA2Xt4sFd0zHWGlNnKTmHg8TXpcB0OJWL+HWQQ\r
28         Lo2WrywvPufnrn5WgC5PuAThdy0U/MJO22WaheCJt7CdwG53gGLan1FI6eAuaiQlxBMw\r
29         zhd3accOY8gg6aqPKfZdODlSbWikVn7fZ4wAI=\r
30 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
31         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
32         b=QbHo5RuB9BeEasosj0hdUJ8mdiy0ui9pdZ3l1GUj6WJDInMCBEzwNN+u/K56L51oDE\r
33         OF4sp4XUPWJbZGfNn3g+FGLL8CbpqQvxxt707JDkBEWUuzXPmyA40SE/f0LjO9SX3cCl\r
34         kTPQsIILsT5q5xb943/9rJEjEIfoDuJp/78h8=\r
35 Received: by 10.102.207.40 with SMTP id e40mr225352mug.86.1264019730162;\r
36         Wed, 20 Jan 2010 12:35:30 -0800 (PST)\r
37 Received: from localhost.localdomain (umass-959-105.wireless.umass.edu\r
38         [128.119.77.105])\r
39         by mx.google.com with ESMTPS id 12sm1036701muq.18.2010.01.20.12.35.28\r
40         (version=SSLv3 cipher=RC4-MD5); Wed, 20 Jan 2010 12:35:29 -0800 (PST)\r
41 From: Ben Gamari <bgamari.foss@gmail.com>\r
42 To: notmuch@notmuchmail.org,\r
43         cworth@cworth.org\r
44 Date: Wed, 20 Jan 2010 15:35:20 -0500\r
45 Message-Id: <1264019720-359-1-git-send-email-bgamari.foss@gmail.com>\r
46 X-Mailer: git-send-email 1.6.3.3\r
47 In-Reply-To: <87hbqgttqz.fsf@convex-new.cs.unb.ca>\r
48 References: <87hbqgttqz.fsf@convex-new.cs.unb.ca>\r
49 Subject: [notmuch] [PATCH] Build and link against notmuch shared library\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Wed, 20 Jan 2010 20:35:32 -0000\r
63 \r
64 How's this look?\r
65 \r
66 \r
67 ---\r
68  Makefile           |    1 +\r
69  Makefile.local     |    6 ++++--\r
70  lib/Makefile.local |   10 ++++++----\r
71  3 files changed, 11 insertions(+), 6 deletions(-)\r
72 \r
73 diff --git a/Makefile b/Makefile\r
74 index 021fdb8..0f56bc6 100644\r
75 --- a/Makefile\r
76 +++ b/Makefile\r
77 @@ -1,3 +1,4 @@\r
78 +SONAME = libnotmuch.so.1\r
79  WARN_CXXFLAGS=-Wall -Wextra -Wwrite-strings -Wswitch-enum\r
80  WARN_CFLAGS=$(WARN_CXXFLAGS) -Wmissing-declarations\r
81  \r
82 diff --git a/Makefile.local b/Makefile.local\r
83 index 933ff4c..71bd639 100644\r
84 --- a/Makefile.local\r
85 +++ b/Makefile.local\r
86 @@ -21,8 +21,8 @@ notmuch_client_srcs =         \\r
87         show-message.c\r
88  \r
89  notmuch_client_modules = $(notmuch_client_srcs:.c=.o)\r
90 -notmuch: $(notmuch_client_modules) lib/notmuch.a\r
91 -       $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@\r
92 +notmuch: $(notmuch_client_modules) lib/libnotmuch.so\r
93 +       $(call quiet,CXX,$(LDFLAGS)) -lnotmuch $(filter-out lib/libnotmuch.so,$^) $(FINAL_LDFLAGS) -o $@\r
94  \r
95  notmuch.1.gz: notmuch.1\r
96         $(call quiet,gzip) --stdout $^ > $@\r
97 @@ -33,6 +33,8 @@ install: all notmuch.1.gz\r
98                 install -d $$d ; \\r
99         done ;\r
100         install notmuch $(DESTDIR)$(prefix)/bin/\r
101 +       install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/\r
102 +       ln -sf $(DESTDIR)$(prefix)/lib/$(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so\r
103         install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/\r
104  \r
105  install-emacs: install emacs\r
106 diff --git a/lib/Makefile.local b/lib/Makefile.local\r
107 index 70489e1..cfefc9b 100644\r
108 --- a/lib/Makefile.local\r
109 +++ b/lib/Makefile.local\r
110 @@ -1,5 +1,5 @@\r
111  dir=lib\r
112 -extra_cflags += -I$(dir)\r
113 +extra_cflags += -I$(dir) -fPIC\r
114  \r
115  libnotmuch_c_srcs =            \\r
116         $(dir)/libsha1.c        \\r
117 @@ -18,8 +18,10 @@ libnotmuch_cxx_srcs =                \\r
118         $(dir)/thread.cc\r
119  \r
120  libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)\r
121 -$(dir)/notmuch.a: $(libnotmuch_modules)\r
122 -       $(call quiet,AR) rcs $@ $^\r
123 +$(dir)/$(SONAME): $(libnotmuch_modules)\r
124 +       $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -Wl,-soname=$(SONAME) -shared -o $@\r
125 +$(dir)/libnotmuch.so: $(dir)/$(SONAME)\r
126 +       ln -sf $(dir)/$(SONAME) $(dir)/libnotmuch.so\r
127  \r
128  SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)\r
129 -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a\r
130 +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so $(dir)/$(SONAME)\r
131 -- \r
132 1.6.3.3\r
133 \r