From e992e3479e98b9a428b24fe69df7878b9c284c60 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Mon, 13 Jan 2014 23:06:03 +0200 Subject: [PATCH] Re: [PATCH 2/3] man: partial conversion to pod. --- 2e/267698a2a5b3554bddd7b8d8affdce45674086 | 177 ++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 2e/267698a2a5b3554bddd7b8d8affdce45674086 diff --git a/2e/267698a2a5b3554bddd7b8d8affdce45674086 b/2e/267698a2a5b3554bddd7b8d8affdce45674086 new file mode 100644 index 000000000..b5160d947 --- /dev/null +++ b/2e/267698a2a5b3554bddd7b8d8affdce45674086 @@ -0,0 +1,177 @@ +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 1AEE3431FAF + for ; Mon, 13 Jan 2014 13:06:12 -0800 (PST) +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 UJkEe6XRCP1h for ; + Mon, 13 Jan 2014 13:06:08 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id E43D2431FAE + for ; Mon, 13 Jan 2014 13:06:07 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 94AF4100086; + Mon, 13 Jan 2014 23:06:03 +0200 (EET) +From: Tomi Ollila +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/3] man: partial conversion to pod. +In-Reply-To: <1388921950-5017-3-git-send-email-david@tethera.net> +References: <1366852752-3584-1-git-send-email-david@tethera.net> + <1388921950-5017-1-git-send-email-david@tethera.net> + <1388921950-5017-3-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.17+34~g98b959f (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +Date: Mon, 13 Jan 2014 23:06:03 +0200 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +Cc: David Bremner +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: Mon, 13 Jan 2014 21:06:12 -0000 + +David Bremner writes: + +> From: David Bremner +> +> This allows generation of man page and info document from the same source. +> It is also a bit more friendly to edit for most people. + +IMHO it is good idea to have common format where to produce man, info & +html files. If we're going to need pandoc then the question of source +format explodes with choices... + + +> The conversion was done as follows: +> +> % groff -e -mandoc -Tascii -rHY=0 $* | rman -f POD | sed -e '/./,/^$/!d' -e 's/ +> +> Some small hand-editing of the .pod may be needed afterwards. +> --- +> INSTALL | 6 + +> configure | 12 ++ +> info/Makefile.local | 25 +++- +> man/Makefile.local | 19 ++- +> man/man1/notmuch.1 | 190 ---------------------------- +> man/man7/notmuch-search-terms.7 | 269 ---------------------------------------- +> pod/notmuch-search-terms.pod | 235 +++++++++++++++++++++++++++++++++++ +> pod/notmuch.pod | 155 +++++++++++++++++++++++ +> 8 files changed, 448 insertions(+), 463 deletions(-) +> delete mode 100644 man/man1/notmuch.1 +> delete mode 100644 man/man7/notmuch-search-terms.7 +> create mode 100644 pod/notmuch-search-terms.pod +> create mode 100644 pod/notmuch.pod +> +> diff --git a/INSTALL b/INSTALL +> index 451bf05..697b7b2 100644 +> --- a/INSTALL +> +++ b/INSTALL +> @@ -60,6 +60,12 @@ Talloc which are each described below: +> +> Talloc is available from http://talloc.samba.org/ +> +> + pod2man +> + ------- +> + +> + Some of the documentation is built with pod2man. This is part +> + of the standard Perl distribution since Perl 5.6.0 +> + +> texinfo +> ------- +> +> diff --git a/configure b/configure +> index e75c1d4..6dadbaa 100755 +> --- a/configure +> +++ b/configure +> @@ -389,6 +389,15 @@ else +> have_emacs=0 +> fi +> +> +printf "Checking for pod2man... " +> +if pod2man --help > /dev/null 2>&1; then +> + printf "Yes.\n" +> + have_pod2man=1 +> +else +> + printf "No (man page install may fail)\n" +> + have_pod2man=0 +> +fi +> + +> printf "Checking for makeinfo... " +> if makeinfo --version > /dev/null 2>&1; then +> printf "Yes.\n" +> @@ -768,6 +777,9 @@ HAVE_MAKEINFO = ${have_makeinfo} +> # Whether there's an install-info binary available +> HAVE_INSTALLINFO = ${have_installinfo} +> +> +# Is pod2man in the path? +> +HAVE_POD2MAN = ${have_pod2man} +> + +> # where to install info files +> +> INFODIR = ${INFODIR} +> diff --git a/info/Makefile.local b/info/Makefile.local +> index 55e9740..cca891a 100644 +> --- a/info/Makefile.local +> +++ b/info/Makefile.local +> @@ -2,10 +2,14 @@ +> +> dir := info +> +> +man_texi := $(dir)/notmuch.texi $(dir)/notmuch-search-terms.texi +> +man_info := $(man_texi:.texi=.info) +> +man_entry := $(man_texi:.texi=.entry) +> + +> texi_sources := $(dir)/notmuch-emacs.texi +> emacs_info := $(texi_sources:.texi=.info) +> +> -info := $(emacs_info) +> +info := $(emacs_info) $(man_info) +> +> ifeq ($(HAVE_MAKEINFO),1) +> all: $(info) +> @@ -15,11 +19,23 @@ ifeq ($(HAVE_INSTALLINFO),1) +> install: install-info +> endif +> +> -%.info: %.texi +> +%.entry: ../pod/%.pod +> + printf "@dircategory Notmuch\n@direntry\n" > $@ +> + printf "* %s: (%s). " $(*F) $(*F) >> $@ +> + podselect -section Name $< | \ +> + perl -n -e 's/notmuch.* - (.*)/\u\L$$1/ && print' >> $@ +> + printf "@end direntry\n" >> $@ +> + +> +%.info: %.texi %.entry +> makeinfo --no-split -o $@ $< +> +> $(dir)/notmuch-emacs.info: $(dir)/notmuch-emacs.texi $(dir)/version.texi + +> +%.texi: ../pod/%.pod +> + # a nasty hack, but the nicer ways seem to have bugs. +> + pod2texi $< | \ +> + sed 's/@node Top/@include $(*F).entry\n@node Top/' > $@ + +This usage of pipeline above is problematic as if pod2texi returns nonzero +it is shadowed by return value of sed. Therefore a temporary file is +needed for this kind of operation. + + +Tomi -- 2.26.2