From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/3] doc: configure detection of sphinx and rst2man
Date: Mon, 10 Mar 2014 23:18:28 -0300 [thread overview]
Message-ID: <1394504309-7433-2-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1394504309-7433-1-git-send-email-david@tethera.net>
Because sphinx-build does not provide a convenient way of listing
which builders exist, and some people actually have pre 1.0 sphinx, we
try loading a relevant python module.
Currently the assumption is that no python in path -> no sphinx-build
in path.
---
configure | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/configure b/configure
index 2eaed4a..10356e7 100755
--- a/configure
+++ b/configure
@@ -393,6 +393,27 @@ else
have_emacs=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"
+ have_sphinx=1
+ have_rst2man=0
+else
+ printf "No (falling back to rst2man).\n"
+ have_sphinx=0
+
+ printf "Checking if rst2man is available... "
+ if rst2man -V > /dev/null 2>&1; then
+ printf "Yes.\n"
+ have_rst2man=1
+ else
+ printf "No (so will not install man pages).\n"
+ have_rst2man=0
+ fi
+fi
+
+
+
libdir_in_ldconfig=0
printf "Checking which platform we are on... "
@@ -759,6 +780,12 @@ emacsetcdir=${EMACSETCDIR}
# Whether there's an emacs binary available for byte-compiling
HAVE_EMACS = ${have_emacs}
+# Whether there's a sphinx-build binary available for building documentation
+HAVE_SPHINX=${have_sphinx}
+
+# Whether there's a rst2man binary available and used for building documentation
+HAVE_RST2MAN=${have_rst2man}
+
# The directory to which desktop files should be installed
desktop_dir = \$(prefix)/share/applications
--
1.8.5.3
next prev parent reply other threads:[~2014-03-11 2:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 11:07 [PATCH] doc: build man pages at build time, not install David Bremner
2014-03-10 11:14 ` Tomi Ollila
2014-03-10 17:10 ` Jani Nikula
2014-03-10 22:40 ` Tomi Ollila
2014-03-11 2:18 ` [PATCH 1/3] doc: build man pages at build time; introduce HAVE_SPHINX, HAVE_RST2MAN David Bremner
2014-03-11 2:18 ` David Bremner [this message]
2014-03-11 2:18 ` [PATCH 3/3] doc: have prerst2man.py generate roff files all in one directory David Bremner
2014-03-11 2:34 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394504309-7433-2-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).