diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Makefile.local | 3 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | compat/Makefile | 5 | ||||
-rw-r--r-- | compat/Makefile.local | 8 | ||||
-rw-r--r-- | lib/notmuch-private.h | 2 | ||||
-rw-r--r-- | notmuch-client.h | 3 |
7 files changed, 22 insertions, 7 deletions
@@ -32,9 +32,11 @@ override LDFLAGS += \ $(shell pkg-config --libs glib-2.0 gmime-2.4 talloc) \ $(shell xapian-config --libs) -# Include our local Makefile.local first so that its first target is default -include Makefile.local +all: notmuch notmuch.1.gz + include lib/Makefile.local +include compat/Makefile.local +include Makefile.local # And get user settings from the output of configure Makefile.config: configure diff --git a/Makefile.local b/Makefile.local index aff7d2c0..4b29ad83 100644 --- a/Makefile.local +++ b/Makefile.local @@ -1,8 +1,7 @@ -all: notmuch notmuch.1.gz - emacs: notmuch.elc notmuch_client_srcs = \ + $(notmuch_compat_srcs) \ debugger.c \ gmime-filter-reply.c \ notmuch.c \ @@ -41,8 +41,6 @@ Portability ----------- Fix configure script to test each compiler warning we want to use. -Implement getline locally, (look at gnulib). - Completion ---------- Fix bash completion to complete multiple search options (both --first diff --git a/compat/Makefile b/compat/Makefile new file mode 100644 index 00000000..9a29ffcf --- /dev/null +++ b/compat/Makefile @@ -0,0 +1,5 @@ +all: + $(MAKE) -C .. all + +clean: + $(MAKE) -C .. clean diff --git a/compat/Makefile.local b/compat/Makefile.local new file mode 100644 index 00000000..ccc59aef --- /dev/null +++ b/compat/Makefile.local @@ -0,0 +1,8 @@ +dir=compat +extra_cflags += -I$(dir) + +notmuch_compat_srcs = + +ifneq ($(HAVE_GETLINE),1) +notmuch_compat_srcs += $(dir)/getline.c $(dir)/getdelim.c +endif diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index d3f9a4c4..d2678f06 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -26,6 +26,8 @@ #endif #include <stdio.h> +#include "compat.h" + #include "notmuch.h" NOTMUCH_BEGIN_DECLS diff --git a/notmuch-client.h b/notmuch-client.h index 2888a6c8..50a30fed 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -21,12 +21,13 @@ #ifndef NOTMUCH_CLIENT_H #define NOTMUCH_CLIENT_H - #ifndef _GNU_SOURCE #define _GNU_SOURCE /* for getline */ #endif #include <stdio.h> +#include "compat.h" + #include <gmime/gmime.h> #include "notmuch.h" |