Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C634F429E27 for ; Wed, 12 Mar 2014 20:22:06 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BWl1J40xZ5O4 for ; Wed, 12 Mar 2014 20:22:02 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C2138431FC2 for ; Wed, 12 Mar 2014 20:21:46 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1WNwDK-0000DA-Dt; Thu, 13 Mar 2014 00:21:46 -0300 Received: (nullmailer pid 25679 invoked by uid 1000); Thu, 13 Mar 2014 03:21:29 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [Patch v3 2/4] doc: build man pages into hierarchy, fix help test. Date: Thu, 13 Mar 2014 00:21:15 -0300 Message-Id: <1394680877-25572-3-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394680877-25572-1-git-send-email-david@tethera.net> References: <1394680877-25572-1-git-send-email-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2014 03:22:07 -0000 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 | 11 +++++++---- doc/mkdocdeps.py | 2 +- test/test-lib-common.sh | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/Makefile.local b/doc/Makefile.local index 23f4095..fab6d48 100644 --- a/doc/Makefile.local +++ b/doc/Makefile.local @@ -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 diff --git a/doc/mkdocdeps.py b/doc/mkdocdeps.py index e61bea6..3effdd8 100644 --- a/doc/mkdocdeps.py +++ b/doc/mkdocdeps.py @@ -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') diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index e1eaa5a..892991e 100644 --- a/test/test-lib-common.sh +++ b/test/test-lib-common.sh @@ -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 -- 1.8.5.3