diff options
author | David Bremner <david@tethera.net> | 2014-07-01 13:40:33 -0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-07-09 19:32:15 -0300 |
commit | 10224335514b70acc95f89ced4d900bd6c94990b (patch) | |
tree | ee63d88b5d932bfe9e3fd2e5e8d385a81cb568e1 /doc | |
parent | 0e50854a7feb1feea24745ce0a87be4327803e21 (diff) |
doc: build and install doxygen api docs
In order to support out of tree builds and avoid hardcoding version
number, generate `doc/config.dox` from configure.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.local | 27 | ||||
-rw-r--r-- | doc/doxygen.cfg | 5 |
2 files changed, 27 insertions, 5 deletions
diff --git a/doc/Makefile.local b/doc/Makefile.local index bbd46100..72b8f686 100644 --- a/doc/Makefile.local +++ b/doc/Makefile.local @@ -12,10 +12,12 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py # Internal variables. ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir) +APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3 +DOXYFILE := $(srcdir)/$(dir)/doxygen.cfg .PHONY: sphinx-html sphinx-texinfo sphinx-info -.PHONY: install-man build-man +.PHONY: install-man build-man apidocs install-apidocs %.gz: % rm -f $@ && gzip --stdout $^ > $@ @@ -56,6 +58,23 @@ else endif touch ${MAN_ROFF_FILES} $@ +install-man: install-apidocs + +ifeq ($(HAVE_DOXYGEN),1) +MAN_GZIP_FILES += ${APIMAN}.gz +apidocs: $(APIMAN) +install-apidocs: apidocs + mkdir -p "$(DESTDIR)$(mandir)/man3" + install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3 + +$(APIMAN): $(dir)/config.dox $(srcdir)/$(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h + mkdir -p $(DOCBUILDDIR)/man/man3 + doxygen $(DOXYFILE) +else +apidocs: +install-apidocs: +endif + # Do not try to build or install man pages if a man page converter is # not available. ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00) @@ -74,8 +93,12 @@ install-man: ${MAN_GZIP_FILES} cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz endif +$(dir)/config.dox: version.stamp + echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@ + echo "INPUT=${srcdir}/lib/notmuch.h" >> $@ + $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py $(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@ CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(DOCBUILDDIR)/.roff.stamp -CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc +CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index bfbfcab3..1a53af56 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -4,11 +4,11 @@ # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "Notmuch 0.18" +@INCLUDE = "doc/config.dox" PROJECT_NUMBER = PROJECT_BRIEF = PROJECT_LOGO = -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = doc/_build CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES @@ -96,7 +96,6 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = lib/notmuch.h INPUT_ENCODING = UTF-8 FILE_PATTERNS = RECURSIVE = NO |