notmuch.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
   commit 9979b998666f839e0bbc11fff8265b6462bea799 (patch)
   parent fc3b51f7 lib/getdate: Add a very simple config.h file.
     tree aac31c1578dd8d3f39755afaeb6e94a6c2dd6997
   author Carl Worth <cworth@cworth.org>  2010-03-10 16:32:27 -0800
committer Carl Worth <cworth@cworth.org>  2010-03-10 16:53:19 -0800

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 ":=".
---
 Makefile                   |  2 +-
 lib/Makefile.local         |  8 ++++----
 lib/getdate/.gitignore     |  1 +
 lib/getdate/Makefile       |  7 +++++++
 lib/getdate/Makefile.local | 13 +++++++++++++
 5 files changed, 26 insertions(+), 5 deletions(-)

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


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

git clone https://yhetil.org/notmuch.git