From: Richard Russon Date: Sat, 7 Jul 2018 11:02:05 +0000 (+0100) Subject: create libnotmuch X-Git-Tag: 2019-10-25~759^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=609cad0a92ff993389ac9ec6eae9160db28da6d5;p=neomutt create libnotmuch --- diff --git a/Makefile.autosetup b/Makefile.autosetup index a6dc53478..8dce07a1f 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -77,9 +77,6 @@ NEOMUTTOBJS= addrbook.o alias.o bcache.o browser.o buffy.o \ @if !HAVE_WCSCASECMP NEOMUTTOBJS+= wcscasecmp.o @endif -@if USE_NOTMUCH -NEOMUTTOBJS+= mutt_notmuch.o -@endif @if MIXMASTER NEOMUTTOBJS+= remailer.o @endif @@ -122,6 +119,16 @@ CLEANFILES+= $(LIBMBOX) $(LIBMBOXOBJS) MUTTLIBS+= $(LIBMBOX) ALLOBJS+= $(LIBMBOXOBJS) +############################################################################### +# libnotmuch +@if USE_NOTMUCH +LIBNOTMUCH= libnotmuch.a +LIBNOTMUCHOBJS= notmuch/mutt_notmuch.o +CLEANFILES+= $(LIBNOTMUCH) $(LIBNOTMUCHOBJS) +MUTTLIBS+= $(LIBNOTMUCH) +ALLOBJS+= $(LIBNOTMUCHOBJS) +@endif + ############################################################################### # libmutt LIBMUTT= libmutt.a @@ -280,6 +287,13 @@ $(LIBMBOX): $(PWD)/mbox $(LIBMBOXOBJS) $(PWD)/mbox: $(MKDIR_P) $(PWD)/mbox +# libnotmuch +$(LIBNOTMUCH): $(PWD)/notmuch $(LIBNOTMUCHOBJS) + $(AR) cr $@ $(LIBNOTMUCHOBJS) + $(RANLIB) $@ +$(PWD)/notmuch: + $(MKDIR_P) $(PWD)/notmuch + # libncrypt $(LIBNCRYPT): $(PWD)/ncrypt $(LIBNCRYPTOBJS) $(AR) cr $@ $(LIBNCRYPTOBJS) diff --git a/browser.c b/browser.c index 49bf8cc4e..e22e2743e 100644 --- a/browser.c +++ b/browser.c @@ -62,7 +62,7 @@ #include "nntp/nntp.h" #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif static const struct Mapping FolderHelp[] = { diff --git a/buffy.c b/buffy.c index 550555a89..c04e0504d 100644 --- a/buffy.c +++ b/buffy.c @@ -47,7 +47,7 @@ #include "imap/imap.h" #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif static time_t BuffyTime = 0; /**< last time we started checking for mail */ diff --git a/commands.c b/commands.c index e19db60b5..9a7377f0d 100644 --- a/commands.c +++ b/commands.c @@ -55,7 +55,7 @@ #include "imap/imap.h" #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif #ifdef ENABLE_NLS #include diff --git a/copy.c b/copy.c index b58d39cbe..c786a953b 100644 --- a/copy.c +++ b/copy.c @@ -47,7 +47,7 @@ #include "rfc2047.h" #include "state.h" #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif static int address_header_decode(char **h); diff --git a/curs_lib.c b/curs_lib.c index 704afe6d0..5fc5ea4db 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -53,7 +53,7 @@ #include #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif /* not possible to unget more than one char under some curses libs, and it diff --git a/curs_main.c b/curs_main.c index 4f7522140..f1f60fa47 100644 --- a/curs_main.c +++ b/curs_main.c @@ -64,7 +64,7 @@ #include "imap/imap.h" #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif #ifdef USE_NNTP #include "nntp/nntp.h" diff --git a/init.c b/init.c index cec49f7d5..d2c353445 100644 --- a/init.c +++ b/init.c @@ -58,7 +58,7 @@ #include "sidebar.h" #include "version.h" #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif #ifdef USE_IMAP #include "imap/imap.h" /* for imap_subscribe() */ diff --git a/mh.c b/mh.c index b4400e2e3..5c05eb7a5 100644 --- a/mh.c +++ b/mh.c @@ -53,7 +53,7 @@ #include "protos.h" #include "sort.h" #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif #ifdef USE_HCACHE #include "hcache/hcache.h" diff --git a/mx.c b/mx.c index 8b0015589..f6900daca 100644 --- a/mx.c +++ b/mx.c @@ -73,7 +73,7 @@ #include "nntp/nntp.h" #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif #ifdef ENABLE_NLS #include diff --git a/mutt_notmuch.c b/notmuch/mutt_notmuch.c similarity index 100% rename from mutt_notmuch.c rename to notmuch/mutt_notmuch.c diff --git a/mutt_notmuch.h b/notmuch/mutt_notmuch.h similarity index 100% rename from mutt_notmuch.h rename to notmuch/mutt_notmuch.h diff --git a/po/POTFILES.in b/po/POTFILES.in index 435e25672..f85b721ca 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -95,7 +95,6 @@ mutt_body.c mutt_header.c mutt_logging.c mutt_lua.c -mutt_notmuch.c mutt_signal.c mutt_socket.c mutt_thread.c @@ -119,6 +118,7 @@ ncrypt/pgppacket.c ncrypt/smime.c nntp/newsrc.c nntp/nntp.c +notmuch/mutt_notmuch.c opcodes.h pager.c parse.c diff --git a/send.c b/send.c index 4d434f279..76756006f 100644 --- a/send.c +++ b/send.c @@ -56,7 +56,7 @@ #include "remailer.h" #endif #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif static void append_signature(FILE *f) diff --git a/sidebar.c b/sidebar.c index 9ff44f951..829a2b5ae 100644 --- a/sidebar.c +++ b/sidebar.c @@ -50,7 +50,7 @@ #include "protos.h" #include "sort.h" #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif /* Previous values for some sidebar config */ diff --git a/status.c b/status.c index 6fb2f8a1e..1f48b71a0 100644 --- a/status.c +++ b/status.c @@ -40,7 +40,7 @@ #include "protos.h" #include "sort.h" #ifdef USE_NOTMUCH -#include "mutt_notmuch.h" +#include "notmuch/mutt_notmuch.h" #endif /**