--- /dev/null
+Return-Path: <bremner@tesseract.cs.unb.ca>\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 3AA4B431FB6\r
+ for <notmuch@notmuchmail.org>; Sat, 5 Apr 2014 19:03:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\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 hOtjykn4n7cR for <notmuch@notmuchmail.org>;\r
+ Sat, 5 Apr 2014 19:03:49 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+ [87.98.215.224]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id EDB6A431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 5 Apr 2014 19:03:48 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+ 4.72) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1WWcQN-0001Y0-1V; Sun, 06 Apr 2014 02:03:07 +0000\r
+Received: (nullmailer pid 19885 invoked by uid 1000); Sun, 06 Apr 2014\r
+ 02:02:27 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] doc: build and install doxygen api docs\r
+Date: Sat, 5 Apr 2014 23:02:24 -0300\r
+Message-Id: <1396749744-19638-3-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.9.0\r
+In-Reply-To: <1396749744-19638-1-git-send-email-david@tethera.net>\r
+References: <1389000116-16702-1-git-send-email-tomi.ollila@iki.fi>\r
+ <1396749744-19638-1-git-send-email-david@tethera.net>\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, 06 Apr 2014 02:03:55 -0000\r
+\r
+Add to the build-man and install-man targets. We also stop hardcoding\r
+the version information into doxygen.cfg\r
+---\r
+ doc/Makefile.local | 14 ++++++++++++--\r
+ doc/doxygen.cfg | 4 ++--\r
+ 2 files changed, 14 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/doc/Makefile.local b/doc/Makefile.local\r
+index 0980c71..5189f97 100644\r
+--- a/doc/Makefile.local\r
++++ b/doc/Makefile.local\r
+@@ -12,6 +12,8 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py\r
+ \r
+ # Internal variables.\r
+ ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)\r
++APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3\r
++DOXYFILE := $(dir)/doxygen.cfg\r
+ \r
+ .PHONY: sphinx-html sphinx-texinfo sphinx-info\r
+ \r
+@@ -31,7 +33,7 @@ sphinx-info: sphinx-texinfo\r
+ \r
+ -include $(dir)/docdeps.mk\r
+ \r
+-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})\r
++MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES} ${APIMAN})\r
+ \r
+ # Use the man page converter that is available. We should never depend\r
+ # on MAN_ROFF_FILES if a converter is not available.\r
+@@ -59,16 +61,24 @@ else\r
+ build-man: ${MAN_GZIP_FILES}\r
+ install-man: ${MAN_GZIP_FILES}\r
+ mkdir -p "$(DESTDIR)$(mandir)/man1"\r
++ mkdir -p "$(DESTDIR)$(mandir)/man3"\r
+ mkdir -p "$(DESTDIR)$(mandir)/man5"\r
+ mkdir -p "$(DESTDIR)$(mandir)/man7"\r
+ install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1\r
++ install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3\r
+ install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5\r
+ install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7\r
+ cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz\r
+ endif\r
+ \r
++$(APIMAN): $(dir)/version.dox $(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h\r
++ doxygen $(DOXYFILE)\r
++\r
++$(dir)/version.dox: $(srcdir)/version\r
++ sed -e 's/^/PROJECT_NAME = \"Notmuch /' -e 's/$$/\"/' < $< > $@\r
++\r
+ $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py\r
+ $(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@\r
+ \r
+ CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(dir)/man.stamp\r
+-CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES)\r
++CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/version.dox\r
+diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg\r
+index 65d5fb5..bf9f075 100644\r
+--- a/doc/doxygen.cfg\r
++++ b/doc/doxygen.cfg\r
+@@ -4,11 +4,11 @@\r
+ # Project related configuration options\r
+ #---------------------------------------------------------------------------\r
+ DOXYFILE_ENCODING = UTF-8\r
+-PROJECT_NAME = "Notmuch 0.17"\r
++@INCLUDE = "doc/version.dox"\r
+ PROJECT_NUMBER =\r
+ PROJECT_BRIEF =\r
+ PROJECT_LOGO =\r
+-OUTPUT_DIRECTORY =\r
++OUTPUT_DIRECTORY = doc/_build\r
+ CREATE_SUBDIRS = NO\r
+ OUTPUT_LANGUAGE = English\r
+ BRIEF_MEMBER_DESC = YES\r
+-- \r
+1.9.0\r
+\r