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 777AF4196F3
\r
6 for <notmuch@notmuchmail.org>; Sat, 27 Mar 2010 19:44:30 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
\r
13 DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id 9inHw0GMxrNe for <notmuch@notmuchmail.org>;
\r
18 Sat, 27 Mar 2010 19:44:29 -0700 (PDT)
\r
19 Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.148])
\r
20 by olra.theworths.org (Postfix) with ESMTP id 347FD4196F2
\r
21 for <notmuch@notmuchmail.org>; Sat, 27 Mar 2010 19:44:29 -0700 (PDT)
\r
22 Received: by qw-out-1920.google.com with SMTP id 5so1367412qwf.32
\r
23 for <notmuch@notmuchmail.org>; Sat, 27 Mar 2010 19:44:28 -0700 (PDT)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
25 h=domainkey-signature:received:received:message-id:date:from:subject
\r
26 :to:cc:in-reply-to:references;
\r
27 bh=wF9yo7dBia0l7CcMlzxvtmOQeLA1nPu1lx7tXm1rRfs=;
\r
28 b=ChPKupIMcno6ZR9IHqTTBOfklabGaF5ylKk5lOM1Z8Wyi61LCrzwdyLEnT9GLUf2HU
\r
29 ypBduBoXnSq1IRmlzpMbu9B6lV9+u6P+uOoIZZZJmdvYUwKmimnCtYdd8QdU4E9bzqhe
\r
30 lQw4toKe8xvxsm/YpPiPDvzW9QkzjqjYlG5zE=
\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
32 h=message-id:date:from:subject:to:cc:in-reply-to:references;
\r
33 b=I6AyI3vQe+zl4Zs3AGOE3zlBT+2eEg31FpPxkWWTVk5N604XRn5aeE9hwzL1qwKo1I
\r
34 2CqMCKOE2jHmWQ2Jdn+AGINa4Nivj9G7+lxGcO/UxmreVFaXRVODf8ZbgKXeI1ohZ3SJ
\r
35 ZMSbeSO702DxoMZntrhglSVbKcC5dqK6Mn3QQ=
\r
36 Received: by 10.224.72.34 with SMTP id k34mr1124540qaj.283.1269744268622;
\r
37 Sat, 27 Mar 2010 19:44:28 -0700 (PDT)
\r
38 Received: from localhost (pool-96-236-124-222.spfdma.east.verizon.net
\r
40 by mx.google.com with ESMTPS id 7sm7289613qwf.34.2010.03.27.19.44.26
\r
41 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
42 Sat, 27 Mar 2010 19:44:27 -0700 (PDT)
\r
43 Message-ID: <4baec28b.47c2f10a.3633.1551@mx.google.com>
\r
44 Date: Sat, 27 Mar 2010 19:44:27 -0700 (PDT)
\r
45 From: Ben Gamari <bgamari.foss@gmail.com>
\r
46 To: Ingmar Vanhassel <ingmar@exherbo.org>, notmuch@notmuchmail.org
\r
47 In-Reply-To: <1268401656-12827-2-git-send-email-ingmar@exherbo.org>
\r
48 References: <1268347072-2050-1-git-send-email-bgamari.foss@gmail.com>
\r
49 <1268401656-12827-2-git-send-email-ingmar@exherbo.org>
\r
50 Subject: Re: [notmuch] [PATCH 1/3] Build and link against notmuch shared
\r
51 library, install notmuch.h
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Sun, 28 Mar 2010 02:44:30 -0000
\r
66 Does anyone have this queued up to be merged upstream? I think we're beginning
\r
67 to see the need for a library at this point and as far as I can see, this is an
\r
68 excellent patch for it.
\r
72 Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
\r
74 On Fri, 12 Mar 2010 14:47:34 +0100, Ingmar Vanhassel <ingmar@exherbo.org> wrote:
\r
75 > From: Ben Gamari <bgamari.foss@gmail.com>
\r
77 > Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
\r
81 > Makefile.local | 10 +++++++---
\r
82 > lib/Makefile.local | 9 +++++----
\r
83 > 4 files changed, 14 insertions(+), 7 deletions(-)
\r
85 > diff --git a/.gitignore b/.gitignore
\r
86 > index efa98fb..daf8094 100644
\r
89 > @@ -5,6 +5,7 @@ tags
\r
97 > diff --git a/Makefile b/Makefile
\r
98 > index 46f001c..80eedd0 100644
\r
102 > +SONAME = libnotmuch.so.1
\r
103 > WARN_CXXFLAGS=-Wall -Wextra -Wwrite-strings -Wswitch-enum
\r
104 > WARN_CFLAGS=$(WARN_CXXFLAGS) -Wmissing-declarations
\r
106 > diff --git a/Makefile.local b/Makefile.local
\r
107 > index 3c2a629..31ab534 100644
\r
108 > --- a/Makefile.local
\r
109 > +++ b/Makefile.local
\r
110 > @@ -20,18 +20,22 @@ notmuch_client_srcs = \
\r
113 > notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
\r
114 > -notmuch: $(notmuch_client_modules) lib/notmuch.a
\r
115 > - $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@
\r
116 > +notmuch: $(notmuch_client_modules) lib/libnotmuch.so
\r
117 > + $(call quiet,CC,$(LDFLAGS)) -Llib -lnotmuch $(filter-out lib/libnotmuch.so,$^) $(FINAL_LDFLAGS) -o $@
\r
119 > notmuch.1.gz: notmuch.1
\r
120 > $(call quiet,gzip) --stdout $^ > $@
\r
122 > install: all notmuch.1.gz
\r
123 > - for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 ; \
\r
124 > + for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/lib/ \
\r
125 > + $(DESTDIR)$(prefix)/include/ $(DESTDIR)$(prefix)/share/man/man1 ; \
\r
127 > install -d $$d ; \
\r
129 > install notmuch $(DESTDIR)$(prefix)/bin/
\r
130 > + install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/
\r
131 > + install lib/notmuch.h $(DESTDIR)$(prefix)/include/
\r
132 > + ln -sf $(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so
\r
133 > install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
\r
134 > ifeq ($(MAKECMDGOALS), install)
\r
136 > diff --git a/lib/Makefile.local b/lib/Makefile.local
\r
137 > index 495b27e..f848946 100644
\r
138 > --- a/lib/Makefile.local
\r
139 > +++ b/lib/Makefile.local
\r
142 > -extra_cflags += -I$(dir)
\r
143 > +extra_cflags += -I$(dir) -fPIC
\r
145 > libnotmuch_c_srcs = \
\r
146 > $(dir)/libsha1.c \
\r
147 > @@ -18,8 +18,9 @@ libnotmuch_cxx_srcs = \
\r
150 > libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
\r
151 > -$(dir)/notmuch.a: $(libnotmuch_modules)
\r
152 > - $(call quiet,AR) rcs $@ $^
\r
153 > +$(dir)/libnotmuch.so : $(libnotmuch_modules)
\r
154 > + $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
\r
155 > + ln -sf $(SONAME) $@
\r
157 > SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
\r
158 > -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a
\r
159 > +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so *.so
\r