[Patch v4 1/3] doc: build and install doxygen api docs

2014-07-09 Thread Tomi Ollila
On Wed, Jul 09 2014, David Bremner  wrote:

> In order to support out of tree builds, generate `doc/config.dox` from
> configure.
>
> In order to avoid hardcoding version in doxygen.cfg, generate
> doc/version.dox at build time.

is this commit message accurate ?

> ---
>  configure  | 12 
>  doc/Makefile.local | 27 +--
>  doc/doxygen.cfg|  5 ++---
>  3 files changed, 39 insertions(+), 5 deletions(-)
>
> diff --git a/configure b/configure
> index 9514d4d..fa44188 100755
> --- a/configure
> +++ b/configure
> @@ -417,6 +417,15 @@ else
>  have_emacs=0
>  fi
>  
> +printf "Checking if doxygen is available... "
> +if doxygen -v > /dev/null 2>&1; then

Doxygen 1.6.1 does not know -v -- and exits w/ value 1. If we wanted to
allow man generation using that version (out-of-the-box) then the line
above should be `if command -v doxygen >/dev/null; then`

otherwise this series looks good and generation seems to work.

Tomi

> +printf "Yes.\n"
> +have_doxygen=1
> +else
> +printf "No (so will not install api docs)\n"
> +have_doxygen=0
> +fi
> +


Re: [Patch v4 1/3] doc: build and install doxygen api docs

2014-07-09 Thread Tomi Ollila
On Wed, Jul 09 2014, David Bremner  wrote:

> In order to support out of tree builds, generate `doc/config.dox` from
> configure.
>
> In order to avoid hardcoding version in doxygen.cfg, generate
> doc/version.dox at build time.

is this commit message accurate ?

> ---
>  configure  | 12 
>  doc/Makefile.local | 27 +--
>  doc/doxygen.cfg|  5 ++---
>  3 files changed, 39 insertions(+), 5 deletions(-)
>
> diff --git a/configure b/configure
> index 9514d4d..fa44188 100755
> --- a/configure
> +++ b/configure
> @@ -417,6 +417,15 @@ else
>  have_emacs=0
>  fi
>  
> +printf "Checking if doxygen is available... "
> +if doxygen -v > /dev/null 2>&1; then

Doxygen 1.6.1 does not know -v -- and exits w/ value 1. If we wanted to
allow man generation using that version (out-of-the-box) then the line
above should be `if command -v doxygen >/dev/null; then`

otherwise this series looks good and generation seems to work.

Tomi

> +printf "Yes.\n"
> +have_doxygen=1
> +else
> +printf "No (so will not install api docs)\n"
> +have_doxygen=0
> +fi
> +
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[Patch v4 1/3] doc: build and install doxygen api docs

2014-07-08 Thread David Bremner
In order to support out of tree builds, generate `doc/config.dox` from
configure.

In order to avoid hardcoding version in doxygen.cfg, generate
doc/version.dox at build time.
---
 configure  | 12 
 doc/Makefile.local | 27 +--
 doc/doxygen.cfg|  5 ++---
 3 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 9514d4d..fa44188 100755
--- a/configure
+++ b/configure
@@ -417,6 +417,15 @@ else
 have_emacs=0
 fi

+printf "Checking if doxygen is available... "
+if doxygen -v > /dev/null 2>&1; then
+printf "Yes.\n"
+have_doxygen=1
+else
+printf "No (so will not install api docs)\n"
+have_doxygen=0
+fi
+
 printf "Checking if sphinx is available and supports nroff output... "
 if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > 
/dev/null 2>&1 ; then
 printf "Yes.\n"
@@ -829,6 +838,9 @@ HAVE_SPHINX=${have_sphinx}
 # Whether there's a rst2man binary available for building documentation
 HAVE_RST2MAN=${have_rst2man}

+# Whether there's a doxygen binary available for building api documentation
+HAVE_DOXYGEN=${have_doxygen}
+
 # The directory to which desktop files should be installed
 desktop_dir = \$(prefix)/share/applications

diff --git a/doc/Makefile.local b/doc/Makefile.local
index bbd4610..72b8f68 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 bfbfcab..1a53af5 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"
+ at 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
-- 
2.0.0.rc2



[Patch v4 1/3] doc: build and install doxygen api docs

2014-07-08 Thread David Bremner
In order to support out of tree builds, generate `doc/config.dox` from
configure.

In order to avoid hardcoding version in doxygen.cfg, generate
doc/version.dox at build time.
---
 configure  | 12 
 doc/Makefile.local | 27 +--
 doc/doxygen.cfg|  5 ++---
 3 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 9514d4d..fa44188 100755
--- a/configure
+++ b/configure
@@ -417,6 +417,15 @@ else
 have_emacs=0
 fi
 
+printf "Checking if doxygen is available... "
+if doxygen -v > /dev/null 2>&1; then
+printf "Yes.\n"
+have_doxygen=1
+else
+printf "No (so will not install api docs)\n"
+have_doxygen=0
+fi
+
 printf "Checking if sphinx is available and supports nroff output... "
 if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > 
/dev/null 2>&1 ; then
 printf "Yes.\n"
@@ -829,6 +838,9 @@ HAVE_SPHINX=${have_sphinx}
 # Whether there's a rst2man binary available for building documentation
 HAVE_RST2MAN=${have_rst2man}
 
+# Whether there's a doxygen binary available for building api documentation
+HAVE_DOXYGEN=${have_doxygen}
+
 # The directory to which desktop files should be installed
 desktop_dir = \$(prefix)/share/applications
 
diff --git a/doc/Makefile.local b/doc/Makefile.local
index bbd4610..72b8f68 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 bfbfcab..1a53af5 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
-- 
2.0.0.rc2

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[Patch v3 1/3] doc: build and install doxygen api docs

2014-07-06 Thread David Bremner
In order to support out of tree builds, generate `doc/config.dox` from
configure.

In order to avoid hardcoding version in doxygen.cfg, generate
doc/version.dox at build time.
---
 configure  | 18 ++
 doc/Makefile.local | 26 --
 doc/doxygen.cfg|  6 +++---
 3 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 9514d4d..ec3a895 100755
--- a/configure
+++ b/configure
@@ -417,6 +417,15 @@ else
 have_emacs=0
 fi

+printf "Checking if doxygen is available... "
+if doxygen -v > /dev/null 2>&1; then
+printf "Yes.\n"
+have_doxygen=1
+else
+printf "No (so will not install api docs)\n"
+have_doxygen=0
+fi
+
 printf "Checking if sphinx is available and supports nroff output... "
 if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > 
/dev/null 2>&1 ; then
 printf "Yes.\n"
@@ -725,6 +734,12 @@ commands to compile and install notmuch:

 EOF

+# construct the Doxygen file list
+cat > doc/config.dox < Makefile.config < $@
@@ -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)/version.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,11 @@ install-man: ${MAN_GZIP_FILES}
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif

+$(dir)/version.dox: version.stamp
+   echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
+
 $(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)/version.dox $(dir)/config.dox
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index bfbfcab..68e8969 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"
+ at INCLUDE   =  "doc/version.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,7 @@ WARN_LOGFILE   =
 #---
 # configuration options related to the input files
 #---
-INPUT  = lib/notmuch.h
+ at INCLUDE   = doc/config.dox
 INPUT_ENCODING = UTF-8
 FILE_PATTERNS  =
 RECURSIVE  = NO
-- 
2.0.0.rc2



[Patch v3 1/3] doc: build and install doxygen api docs

2014-07-06 Thread David Bremner
In order to support out of tree builds, generate `doc/config.dox` from
configure.

In order to avoid hardcoding version in doxygen.cfg, generate
doc/version.dox at build time.
---
 configure  | 18 ++
 doc/Makefile.local | 26 --
 doc/doxygen.cfg|  6 +++---
 3 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 9514d4d..ec3a895 100755
--- a/configure
+++ b/configure
@@ -417,6 +417,15 @@ else
 have_emacs=0
 fi
 
+printf "Checking if doxygen is available... "
+if doxygen -v > /dev/null 2>&1; then
+printf "Yes.\n"
+have_doxygen=1
+else
+printf "No (so will not install api docs)\n"
+have_doxygen=0
+fi
+
 printf "Checking if sphinx is available and supports nroff output... "
 if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > 
/dev/null 2>&1 ; then
 printf "Yes.\n"
@@ -725,6 +734,12 @@ commands to compile and install notmuch:
 
 EOF
 
+# construct the Doxygen file list
+cat > doc/config.dox < Makefile.config < $@
@@ -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)/version.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,11 @@ install-man: ${MAN_GZIP_FILES}
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif
 
+$(dir)/version.dox: version.stamp
+   echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
+
 $(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)/version.dox $(dir)/config.dox
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index bfbfcab..68e8969 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/version.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,7 @@ WARN_LOGFILE   =
 #---
 # configuration options related to the input files
 #---
-INPUT  = lib/notmuch.h
+@INCLUDE  = doc/config.dox
 INPUT_ENCODING = UTF-8
 FILE_PATTERNS  =
 RECURSIVE  = NO
-- 
2.0.0.rc2

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] doc: build and install doxygen api docs

2014-07-04 Thread David Bremner
David Bremner  writes:

> Add to the build-man and install-man targets. We also stop hardcoding
> the version information into doxygen.cfg

There are (at least) two outstanding issues with this patch:

- configure needs to check for doxygen and disable api docs 
  if not found.

- it doesn't work for out of tree build.

So more work for me I guess.

d


Re: [PATCH 1/2] doc: build and install doxygen api docs

2014-07-04 Thread David Bremner
David Bremner  writes:

> Add to the build-man and install-man targets. We also stop hardcoding
> the version information into doxygen.cfg

There are (at least) two outstanding issues with this patch:

- configure needs to check for doxygen and disable api docs 
  if not found.

- it doesn't work for out of tree build.

So more work for me I guess.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] doc: build and install doxygen api docs

2014-07-01 Thread David Bremner
Add to the build-man and install-man targets. We also stop hardcoding
the version information into doxygen.cfg
---
 doc/Makefile.local | 14 --
 doc/doxygen.cfg|  4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/doc/Makefile.local b/doc/Makefile.local
index bbd4610..e9402b4 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -12,6 +12,8 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py

 # Internal variables.
 ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
+APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3
+DOXYFILE   := $(dir)/doxygen.cfg

 .PHONY: sphinx-html sphinx-texinfo sphinx-info

@@ -31,7 +33,7 @@ sphinx-info: sphinx-texinfo

 -include $(dir)/docdeps.mk

-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES} ${APIMAN})

 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.
@@ -66,16 +68,24 @@ else
 build-man: ${MAN_GZIP_FILES}
 install-man: ${MAN_GZIP_FILES}
mkdir -p "$(DESTDIR)$(mandir)/man1"
+   mkdir -p "$(DESTDIR)$(mandir)/man3"
mkdir -p "$(DESTDIR)$(mandir)/man5"
mkdir -p "$(DESTDIR)$(mandir)/man7"
install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
+   install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3
install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif

+$(APIMAN): $(dir)/version.dox $(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
+   doxygen $(DOXYFILE)
+
+$(dir)/version.dox: version.stamp
+   echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
+
 $(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)/version.dox
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index bfbfcab..bf9f075 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"
+ at INCLUDE   =  "doc/version.dox"
 PROJECT_NUMBER =
 PROJECT_BRIEF  =
 PROJECT_LOGO   =
-OUTPUT_DIRECTORY   =
+OUTPUT_DIRECTORY   = doc/_build
 CREATE_SUBDIRS = NO
 OUTPUT_LANGUAGE= English
 BRIEF_MEMBER_DESC  = YES
-- 
2.0.0.rc2



[PATCH 1/2] doc: build and install doxygen api docs

2014-07-01 Thread David Bremner
Add to the build-man and install-man targets. We also stop hardcoding
the version information into doxygen.cfg
---
 doc/Makefile.local | 14 --
 doc/doxygen.cfg|  4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/doc/Makefile.local b/doc/Makefile.local
index bbd4610..e9402b4 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -12,6 +12,8 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py
 
 # Internal variables.
 ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
+APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3
+DOXYFILE   := $(dir)/doxygen.cfg
 
 .PHONY: sphinx-html sphinx-texinfo sphinx-info
 
@@ -31,7 +33,7 @@ sphinx-info: sphinx-texinfo
 
 -include $(dir)/docdeps.mk
 
-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES} ${APIMAN})
 
 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.
@@ -66,16 +68,24 @@ else
 build-man: ${MAN_GZIP_FILES}
 install-man: ${MAN_GZIP_FILES}
mkdir -p "$(DESTDIR)$(mandir)/man1"
+   mkdir -p "$(DESTDIR)$(mandir)/man3"
mkdir -p "$(DESTDIR)$(mandir)/man5"
mkdir -p "$(DESTDIR)$(mandir)/man7"
install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
+   install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3
install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif
 
+$(APIMAN): $(dir)/version.dox $(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
+   doxygen $(DOXYFILE)
+
+$(dir)/version.dox: version.stamp
+   echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
+
 $(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)/version.dox
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index bfbfcab..bf9f075 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/version.dox"
 PROJECT_NUMBER =
 PROJECT_BRIEF  =
 PROJECT_LOGO   =
-OUTPUT_DIRECTORY   =
+OUTPUT_DIRECTORY   = doc/_build
 CREATE_SUBDIRS = NO
 OUTPUT_LANGUAGE= English
 BRIEF_MEMBER_DESC  = YES
-- 
2.0.0.rc2

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] doc: build and install doxygen api docs

2014-04-06 Thread Tomi Ollila
On Sun, Apr 06 2014, David Bremner  wrote:

> Add to the build-man and install-man targets. We also stop hardcoding
> the version information into doxygen.cfg
> ---
>  doc/Makefile.local | 14 --
>  doc/doxygen.cfg|  4 ++--
>  2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/doc/Makefile.local b/doc/Makefile.local
> index 0980c71..5189f97 100644
> --- a/doc/Makefile.local
> +++ b/doc/Makefile.local
> @@ -12,6 +12,8 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py
>  
>  # Internal variables.
>  ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
> +APIMAN   := $(DOCBUILDDIR)/man/man3/notmuch.3
> +DOXYFILE := $(dir)/doxygen.cfg
>  
>  .PHONY: sphinx-html sphinx-texinfo sphinx-info
>  
> @@ -31,7 +33,7 @@ sphinx-info: sphinx-texinfo
>  
>  -include $(dir)/docdeps.mk
>  
> -MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
> +MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES} ${APIMAN})
>  
>  # Use the man page converter that is available. We should never depend
>  # on MAN_ROFF_FILES if a converter is not available.
> @@ -59,16 +61,24 @@ else
>  build-man: ${MAN_GZIP_FILES}
>  install-man: ${MAN_GZIP_FILES}
>   mkdir -p "$(DESTDIR)$(mandir)/man1"
> + mkdir -p "$(DESTDIR)$(mandir)/man3"
>   mkdir -p "$(DESTDIR)$(mandir)/man5"
>   mkdir -p "$(DESTDIR)$(mandir)/man7"
>   install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
> + install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3
>   install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
>   install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
>   cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
>  endif
>  
> +$(APIMAN): $(dir)/version.dox $(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
> + doxygen $(DOXYFILE)
> +
> +$(dir)/version.dox: $(srcdir)/version
> + sed -e 's/^/PROJECT_NAME = \"Notmuch /' -e 's/$$/\"/' < $< > $@
> +

LGTM, although:

  echo "PROJECT_NAME = \"Notmuch `cat $<`\"" >$@

no, 

  echo 'PROJECT_NAME = "Notmuch $(VERSION)"' > $@


... and, the dependency should be to version.stamp (w/o $(srcdir)) after

id:1395261431-24668-1b-git-send-email-tomi.ollila at iki.fi is merged :D

... as especially developers need to know the exact version they have
in their git tree instead of last released one.

I marked my patch in this thread obsolete (my previous statement makes this
obvious) and 1/1 on this series ready.

Tomi



>  $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py
>   $(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@
>  
>  CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(dir)/man.stamp
> -CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES)
> +CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/version.dox
> diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
> index 65d5fb5..bf9f075 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.17"
> + at INCLUDE =  "doc/version.dox"
>  PROJECT_NUMBER =
>  PROJECT_BRIEF  =
>  PROJECT_LOGO   =
> -OUTPUT_DIRECTORY   =
> +OUTPUT_DIRECTORY   = doc/_build
>  CREATE_SUBDIRS = NO
>  OUTPUT_LANGUAGE= English
>  BRIEF_MEMBER_DESC  = YES
> -- 
> 1.9.0


[PATCH 2/2] doc: build and install doxygen api docs

2014-04-05 Thread David Bremner
Add to the build-man and install-man targets. We also stop hardcoding
the version information into doxygen.cfg
---
 doc/Makefile.local | 14 --
 doc/doxygen.cfg|  4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/doc/Makefile.local b/doc/Makefile.local
index 0980c71..5189f97 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -12,6 +12,8 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py

 # Internal variables.
 ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
+APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3
+DOXYFILE   := $(dir)/doxygen.cfg

 .PHONY: sphinx-html sphinx-texinfo sphinx-info

@@ -31,7 +33,7 @@ sphinx-info: sphinx-texinfo

 -include $(dir)/docdeps.mk

-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES} ${APIMAN})

 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.
@@ -59,16 +61,24 @@ else
 build-man: ${MAN_GZIP_FILES}
 install-man: ${MAN_GZIP_FILES}
mkdir -p "$(DESTDIR)$(mandir)/man1"
+   mkdir -p "$(DESTDIR)$(mandir)/man3"
mkdir -p "$(DESTDIR)$(mandir)/man5"
mkdir -p "$(DESTDIR)$(mandir)/man7"
install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
+   install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3
install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif

+$(APIMAN): $(dir)/version.dox $(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
+   doxygen $(DOXYFILE)
+
+$(dir)/version.dox: $(srcdir)/version
+   sed -e 's/^/PROJECT_NAME = \"Notmuch /' -e 's/$$/\"/' < $< > $@
+
 $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py
$(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@

 CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(dir)/man.stamp
-CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES)
+CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/version.dox
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index 65d5fb5..bf9f075 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.17"
+ at INCLUDE   =  "doc/version.dox"
 PROJECT_NUMBER =
 PROJECT_BRIEF  =
 PROJECT_LOGO   =
-OUTPUT_DIRECTORY   =
+OUTPUT_DIRECTORY   = doc/_build
 CREATE_SUBDIRS = NO
 OUTPUT_LANGUAGE= English
 BRIEF_MEMBER_DESC  = YES
-- 
1.9.0



build and install doxygen api docs

2014-04-05 Thread David Bremner
I'm not sure if we really want to install the API docs yet, but I was
reviewing Tomi's patch and it occured to me that this was one more
place where we could stop hardcoding the version number.



[PATCH 2/2] doc: build and install doxygen api docs

2014-04-05 Thread David Bremner
Add to the build-man and install-man targets. We also stop hardcoding
the version information into doxygen.cfg
---
 doc/Makefile.local | 14 --
 doc/doxygen.cfg|  4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/doc/Makefile.local b/doc/Makefile.local
index 0980c71..5189f97 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -12,6 +12,8 @@ mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py
 
 # Internal variables.
 ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
+APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3
+DOXYFILE   := $(dir)/doxygen.cfg
 
 .PHONY: sphinx-html sphinx-texinfo sphinx-info
 
@@ -31,7 +33,7 @@ sphinx-info: sphinx-texinfo
 
 -include $(dir)/docdeps.mk
 
-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES} ${APIMAN})
 
 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.
@@ -59,16 +61,24 @@ else
 build-man: ${MAN_GZIP_FILES}
 install-man: ${MAN_GZIP_FILES}
mkdir -p "$(DESTDIR)$(mandir)/man1"
+   mkdir -p "$(DESTDIR)$(mandir)/man3"
mkdir -p "$(DESTDIR)$(mandir)/man5"
mkdir -p "$(DESTDIR)$(mandir)/man7"
install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
+   install -m0644 $(DOCBUILDDIR)/man/man3/*.3.gz $(DESTDIR)/$(mandir)/man3
install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif
 
+$(APIMAN): $(dir)/version.dox $(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
+   doxygen $(DOXYFILE)
+
+$(dir)/version.dox: $(srcdir)/version
+   sed -e 's/^/PROJECT_NAME = \"Notmuch /' -e 's/$$/\"/' < $< > $@
+
 $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py
$(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@
 
 CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(dir)/man.stamp
-CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES)
+CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/version.dox
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index 65d5fb5..bf9f075 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.17"
+@INCLUDE  =  "doc/version.dox"
 PROJECT_NUMBER =
 PROJECT_BRIEF  =
 PROJECT_LOGO   =
-OUTPUT_DIRECTORY   =
+OUTPUT_DIRECTORY   = doc/_build
 CREATE_SUBDIRS = NO
 OUTPUT_LANGUAGE= English
 BRIEF_MEMBER_DESC  = YES
-- 
1.9.0

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


build and install doxygen api docs

2014-04-05 Thread David Bremner
I'm not sure if we really want to install the API docs yet, but I was
reviewing Tomi's patch and it occured to me that this was one more
place where we could stop hardcoding the version number.

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch