Re: [notmuch] [PATCH 1/3] Build and link against notmuch shared library, install...
authorBen Gamari <bgamari.foss@gmail.com>
Sun, 28 Mar 2010 02:44:27 +0000 (19:44 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:27 +0000 (09:36 -0800)
ae/62b739b633bd3e4eb321717aad633aa4aa83df [new file with mode: 0644]

diff --git a/ae/62b739b633bd3e4eb321717aad633aa4aa83df b/ae/62b739b633bd3e4eb321717aad633aa4aa83df
new file mode 100644 (file)
index 0000000..ce4324e
--- /dev/null
@@ -0,0 +1,161 @@
+Return-Path: <bgamari.foss@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 777AF4196F3\r
+       for <notmuch@notmuchmail.org>; Sat, 27 Mar 2010 19:44:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.999\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+       DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 9inHw0GMxrNe for <notmuch@notmuchmail.org>;\r
+       Sat, 27 Mar 2010 19:44:29 -0700 (PDT)\r
+Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.148])\r
+       by olra.theworths.org (Postfix) with ESMTP id 347FD4196F2\r
+       for <notmuch@notmuchmail.org>; Sat, 27 Mar 2010 19:44:29 -0700 (PDT)\r
+Received: by qw-out-1920.google.com with SMTP id 5so1367412qwf.32\r
+       for <notmuch@notmuchmail.org>; Sat, 27 Mar 2010 19:44:28 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:message-id:date:from:subject\r
+       :to:cc:in-reply-to:references;\r
+       bh=wF9yo7dBia0l7CcMlzxvtmOQeLA1nPu1lx7tXm1rRfs=;\r
+       b=ChPKupIMcno6ZR9IHqTTBOfklabGaF5ylKk5lOM1Z8Wyi61LCrzwdyLEnT9GLUf2HU\r
+       ypBduBoXnSq1IRmlzpMbu9B6lV9+u6P+uOoIZZZJmdvYUwKmimnCtYdd8QdU4E9bzqhe\r
+       lQw4toKe8xvxsm/YpPiPDvzW9QkzjqjYlG5zE=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=message-id:date:from:subject:to:cc:in-reply-to:references;\r
+       b=I6AyI3vQe+zl4Zs3AGOE3zlBT+2eEg31FpPxkWWTVk5N604XRn5aeE9hwzL1qwKo1I\r
+       2CqMCKOE2jHmWQ2Jdn+AGINa4Nivj9G7+lxGcO/UxmreVFaXRVODf8ZbgKXeI1ohZ3SJ\r
+       ZMSbeSO702DxoMZntrhglSVbKcC5dqK6Mn3QQ=\r
+Received: by 10.224.72.34 with SMTP id k34mr1124540qaj.283.1269744268622;\r
+       Sat, 27 Mar 2010 19:44:28 -0700 (PDT)\r
+Received: from localhost (pool-96-236-124-222.spfdma.east.verizon.net\r
+       [96.236.124.222])\r
+       by mx.google.com with ESMTPS id 7sm7289613qwf.34.2010.03.27.19.44.26\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Sat, 27 Mar 2010 19:44:27 -0700 (PDT)\r
+Message-ID: <4baec28b.47c2f10a.3633.1551@mx.google.com>\r
+Date: Sat, 27 Mar 2010 19:44:27 -0700 (PDT)\r
+From: Ben Gamari <bgamari.foss@gmail.com>\r
+To: Ingmar Vanhassel <ingmar@exherbo.org>, notmuch@notmuchmail.org\r
+In-Reply-To: <1268401656-12827-2-git-send-email-ingmar@exherbo.org>\r
+References: <1268347072-2050-1-git-send-email-bgamari.foss@gmail.com>\r
+       <1268401656-12827-2-git-send-email-ingmar@exherbo.org>\r
+Subject: Re: [notmuch] [PATCH 1/3] Build and link against notmuch shared\r
+       library, install notmuch.h\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 28 Mar 2010 02:44:30 -0000\r
+\r
+Does anyone have this queued up to be merged upstream? I think we're beginning\r
+to see the need for a library at this point and as far as I can see, this is an\r
+excellent patch for it.\r
+\r
+- Ben\r
+\r
+Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>\r
+\r
+On Fri, 12 Mar 2010 14:47:34 +0100, Ingmar Vanhassel <ingmar@exherbo.org> wrote:\r
+> From: Ben Gamari <bgamari.foss@gmail.com>\r
+> \r
+> Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>\r
+> ---\r
+>  .gitignore         |    1 +\r
+>  Makefile           |    1 +\r
+>  Makefile.local     |   10 +++++++---\r
+>  lib/Makefile.local |    9 +++++----\r
+>  4 files changed, 14 insertions(+), 7 deletions(-)\r
+> \r
+> diff --git a/.gitignore b/.gitignore\r
+> index efa98fb..daf8094 100644\r
+> --- a/.gitignore\r
+> +++ b/.gitignore\r
+> @@ -5,6 +5,7 @@ tags\r
+>  .deps\r
+>  notmuch\r
+>  notmuch.1.gz\r
+> +libnotmuch.so*\r
+>  *.[ao]\r
+>  *~\r
+>  .*.swp\r
+> diff --git a/Makefile b/Makefile\r
+> index 46f001c..80eedd0 100644\r
+> --- a/Makefile\r
+> +++ b/Makefile\r
+> @@ -1,3 +1,4 @@\r
+> +SONAME = libnotmuch.so.1\r
+>  WARN_CXXFLAGS=-Wall -Wextra -Wwrite-strings -Wswitch-enum\r
+>  WARN_CFLAGS=$(WARN_CXXFLAGS) -Wmissing-declarations\r
+>  \r
+> diff --git a/Makefile.local b/Makefile.local\r
+> index 3c2a629..31ab534 100644\r
+> --- a/Makefile.local\r
+> +++ b/Makefile.local\r
+> @@ -20,18 +20,22 @@ notmuch_client_srcs =            \\r
+>      json.c\r
+>  \r
+>  notmuch_client_modules = $(notmuch_client_srcs:.c=.o)\r
+> -notmuch: $(notmuch_client_modules) lib/notmuch.a\r
+> -    $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@\r
+> +notmuch: $(notmuch_client_modules) lib/libnotmuch.so\r
+> +    $(call quiet,CC,$(LDFLAGS)) -Llib -lnotmuch $(filter-out lib/libnotmuch.so,$^) $(FINAL_LDFLAGS) -o $@\r
+>  \r
+>  notmuch.1.gz: notmuch.1\r
+>      $(call quiet,gzip) --stdout $^ > $@\r
+>  \r
+>  install: all notmuch.1.gz\r
+> -    for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 ; \\r
+> +    for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/lib/ \\r
+> +            $(DESTDIR)$(prefix)/include/ $(DESTDIR)$(prefix)/share/man/man1 ; \\r
+>      do \\r
+>              install -d $$d ; \\r
+>      done ;\r
+>      install notmuch $(DESTDIR)$(prefix)/bin/\r
+> +    install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/\r
+> +    install lib/notmuch.h $(DESTDIR)$(prefix)/include/\r
+> +    ln -sf $(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so\r
+>      install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/\r
+>  ifeq ($(MAKECMDGOALS), install)\r
+>      @echo ""\r
+> diff --git a/lib/Makefile.local b/lib/Makefile.local\r
+> index 495b27e..f848946 100644\r
+> --- a/lib/Makefile.local\r
+> +++ b/lib/Makefile.local\r
+> @@ -1,5 +1,5 @@\r
+>  dir := lib\r
+> -extra_cflags += -I$(dir)\r
+> +extra_cflags += -I$(dir) -fPIC\r
+>  \r
+>  libnotmuch_c_srcs =         \\r
+>      $(dir)/libsha1.c        \\r
+> @@ -18,8 +18,9 @@ libnotmuch_cxx_srcs =              \\r
+>      $(dir)/thread.cc\r
+>  \r
+>  libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)\r
+> -$(dir)/notmuch.a: $(libnotmuch_modules)\r
+> -    $(call quiet,AR) rcs $@ $^\r
+> +$(dir)/libnotmuch.so : $(libnotmuch_modules)\r
+> +    $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@\r
+> +    ln -sf $(SONAME) $@\r
+>  \r
+>  SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)\r
+> -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a\r
+> +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so *.so\r
+> -- \r
+> 1.7.0.2\r