From: Carl Worth Date: Thu, 11 Mar 2010 00:32:27 +0000 (-0800) Subject: lib: Compile getdate source code and include it in notmuch.a X-Git-Url: https://git.cworth.org/git?p=obsolete%2Fnotmuch-old;a=commitdiff_plain;h=refs%2Fheads%2Fgetdate lib: Compile getdate source code and include it in notmuch.a We're not actually *using* the getdate source for anything yet, but this should at least get things integrated nicely into our build system. Again, these Makefile tweaks once again pushed me into fixing some Makefile assignments with "=" to instead use ":=". --- diff --git a/Makefile b/Makefile index 46f001ce..4c71cb8f 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ Makefile.config: configure @echo "" ./configure -subdirs = compat emacs lib +subdirs = compat emacs lib/getdate lib global_deps = Makefile Makefile.config Makefile.local \ $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local) diff --git a/lib/Makefile.local b/lib/Makefile.local index 495b27e0..5dc4f634 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -1,7 +1,7 @@ dir := lib extra_cflags += -I$(dir) -libnotmuch_c_srcs = \ +libnotmuch_c_srcs := \ $(dir)/libsha1.c \ $(dir)/message-file.c \ $(dir)/messages.c \ @@ -9,7 +9,7 @@ libnotmuch_c_srcs = \ $(dir)/tags.c \ $(dir)/xutil.c -libnotmuch_cxx_srcs = \ +libnotmuch_cxx_srcs := \ $(dir)/database.cc \ $(dir)/directory.cc \ $(dir)/index.cc \ @@ -17,8 +17,8 @@ libnotmuch_cxx_srcs = \ $(dir)/query.cc \ $(dir)/thread.cc -libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) -$(dir)/notmuch.a: $(libnotmuch_modules) +libnotmuch_modules := $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) +$(dir)/notmuch.a: $(libnotmuch_modules) $(getdate_modules) $(call quiet,AR) rcs $@ $^ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) diff --git a/lib/getdate/.gitignore b/lib/getdate/.gitignore new file mode 100644 index 00000000..879f4c66 --- /dev/null +++ b/lib/getdate/.gitignore @@ -0,0 +1 @@ +/getdate.c diff --git a/lib/getdate/Makefile b/lib/getdate/Makefile new file mode 100644 index 00000000..3b360feb --- /dev/null +++ b/lib/getdate/Makefile @@ -0,0 +1,7 @@ +# See Makfefile.local for the list of files to be compiled in this +# directory. +all: + $(MAKE) -C ../.. all + +.DEFAULT: + $(MAKE) -C ../.. $@ diff --git a/lib/getdate/Makefile.local b/lib/getdate/Makefile.local new file mode 100644 index 00000000..363cb3cd --- /dev/null +++ b/lib/getdate/Makefile.local @@ -0,0 +1,13 @@ +dir := lib/getdate +extra_cflags += -I$(dir) + +getdate_c_srcs := \ + $(dir)/c-ctype.c \ + $(dir)/getdate.c \ + $(dir)/xalloc-die.c \ + $(dir)/xmalloc.c + +getdate_modules := $(getdate_c_srcs:.c=.o) + +SRCS := $(SRCS) $(getdate_c_srcs) +CLEAN := $(CLEAN) $(getdate_modules) $(dir)/getdate.c