doc: build man pages into hierarchy, fix help test.
authorDavid Bremner <david@tethera.net>
Thu, 13 Mar 2014 03:21:15 +0000 (00:21 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 18 Mar 2014 10:39:12 +0000 (07:39 -0300)
It turns out there was a reason the old man pages were stored in a man
compatible hierarchy, namely so that we could run man on them before
installing.

Hardcode doc build location into test suite.  This isn't ideal, but
let's unbreak the test suite for now.

doc/Makefile.local
doc/mkdocdeps.py
test/test-lib-common.sh

index 23f40952861ee0f9a1cef6ad1a9fe60bea11bdc2..fab6d48ecdc8795df5281f018d5041ea6dfc7184 100644 (file)
@@ -40,7 +40,10 @@ ${MAN_ROFF_FILES}: ${dir}/man.stamp
 $(dir)/man.stamp: ${MAN_RST_FILES}
 ifeq ($(HAVE_SPHINX),1)
        $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
-       touch $@
+       for section in 1 5 7; do \
+           mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
+           mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
+       done
 else ifeq ($(HAVE_RST2MAN),1)
        $(prerst2man) $(DOCBUILDDIR)/.. $(DOCBUILDDIR)/man
        touch $@
@@ -52,9 +55,9 @@ install-man: ${MAN_GZIP_FILES}
        mkdir -p "$(DESTDIR)$(mandir)/man1"
        mkdir -p "$(DESTDIR)$(mandir)/man5"
        mkdir -p "$(DESTDIR)$(mandir)/man7"
-       install -m0644 $(DOCBUILDDIR)/man/*.1.gz $(DESTDIR)/$(mandir)/man1
-       install -m0644 $(DOCBUILDDIR)/man/*.5.gz $(DESTDIR)/$(mandir)/man5
-       install -m0644 $(DOCBUILDDIR)/man/*.7.gz $(DESTDIR)/$(mandir)/man7
+       install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
+       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
 
 $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py
index e61bea60244c121f955a792a6fe9e8e82288af8d..3effdd850c4b9993bdb6d86388e3d30b5308db64 100644 (file)
@@ -10,7 +10,7 @@ rst_files = []
 out=open(outfile,'w')
 for page in man_pages:
     rst_files = rst_files + ["doc/{0:s}.rst".format(page[0])]
-    roff_files = roff_files + ["{0:s}/man/{1:s}.{2:d}".format(builddir,page[1],page[4])]
+    roff_files = roff_files + ["{0:s}/man/{1:s}.{2:d}".format(builddir,page[0],page[4])]
 
 out.write ('MAN_ROFF_FILES := ' + ' \\\n\t'.join(roff_files)+'\n')
 out.write ('MAN_RST_FILES := ' + ' \\\n\t'.join(rst_files)+'\n')
index e1eaa5a03984ccd2372d9e60e2b74cdc0dcd2225..892991e2bd037c9e8745bdf3cf539585cf111d21 100644 (file)
@@ -98,12 +98,12 @@ then
        PATH=$GIT_VALGRIND/bin:$PATH
        GIT_EXEC_PATH=$GIT_VALGRIND/bin
        export GIT_VALGRIND
-       test -n "$notmuch_path" && MANPATH="$notmuch_path/man:$MANPATH"
+       test -n "$notmuch_path" && MANPATH="$notmuch_path/doc/_build/man"
 else # normal case
        if test -n "$notmuch_path"
                then
                        PATH="$notmuch_path:$PATH"
-                       MANPATH="$notmuch_path/man:$MANPATH"
+                       MANPATH="$notmuch_path/doc/_build/man"
                fi
 fi
 export PATH MANPATH