From a936815e79a8eee12cc696a5ee2d81679f6381b4 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Tue, 11 Mar 2014 23:18:28 +2100 Subject: [PATCH] [PATCH 2/3] doc: configure detection of sphinx and rst2man --- bb/12231a4e49e8daa9befa7fec9a57da2e0e7f59 | 107 ++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 bb/12231a4e49e8daa9befa7fec9a57da2e0e7f59 diff --git a/bb/12231a4e49e8daa9befa7fec9a57da2e0e7f59 b/bb/12231a4e49e8daa9befa7fec9a57da2e0e7f59 new file mode 100644 index 000000000..de5166f4f --- /dev/null +++ b/bb/12231a4e49e8daa9befa7fec9a57da2e0e7f59 @@ -0,0 +1,107 @@ +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 4C303431FC3 + for ; Mon, 10 Mar 2014 19:20:17 -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 psiWiFYGLEwf for ; + Mon, 10 Mar 2014 19:20:12 -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 6FA41431FBD + for ; Mon, 10 Mar 2014 19:20:12 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WNCIe-0005QE-3o; Mon, 10 Mar 2014 23:20:12 -0300 +Received: (nullmailer pid 7590 invoked by uid 1000); Tue, 11 Mar 2014 + 02:20:05 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 2/3] doc: configure detection of sphinx and rst2man +Date: Mon, 10 Mar 2014 23:18:28 -0300 +Message-Id: <1394504309-7433-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.5.3 +In-Reply-To: <1394504309-7433-1-git-send-email-david@tethera.net> +References: + <1394504309-7433-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: Tue, 11 Mar 2014 02:20:17 -0000 + +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 + -- 2.26.2