aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-01-18 17:55:10 +0100
committerDavid Bremner <david@tethera.net>2015-01-22 08:37:25 +0100
commitd241a486facf1002b29e499c2fb96a302bfd825b (patch)
treea18fc476da15603c4377863ea031dd8969118f2d /doc
parent7fcd100a2f4fcc3762f2f73bcca3c30cc971b67a (diff)
doc: remove support for rst2man
It was becoming increasingly complicated to support rst2man, and there were apparently not many people that relied on it.
Diffstat (limited to 'doc')
-rw-r--r--doc/INSTALL13
-rw-r--r--doc/Makefile.local7
-rw-r--r--doc/prerst2man.py64
3 files changed, 2 insertions, 82 deletions
diff --git a/doc/INSTALL b/doc/INSTALL
index e37c2b9b..05854760 100644
--- a/doc/INSTALL
+++ b/doc/INSTALL
@@ -1,9 +1,6 @@
This file contains some more detailed information about building and
installing the documentation.
-Building with sphinx.
----------------------
-
- You need sphinx at least version 1.0.
- You can build build and install man pages with 'make install-man'
@@ -12,13 +9,3 @@ Building with sphinx.
(currently only the man pages) with
'make install-{man|info|html|pdf}'
-
-Building the man pages
-----------------------
-
-- You can build the man pages with rst2man (from python-docutils) with
- 'make rst2man'.
-
-- Currently there is no support to automagically install the resulting
- nroff files, but it should work to modify the target install-man
- in doc/Makefile.local.
diff --git a/doc/Makefile.local b/doc/Makefile.local
index e7d0bac8..0bdf2e12 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -7,7 +7,6 @@ SPHINXOPTS := -q
SPHINXBUILD = sphinx-build
DOCBUILDDIR := $(dir)/_build
-prerst2man := python $(srcdir)/$(dir)/prerst2man.py
mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py
# Internal variables.
@@ -50,8 +49,6 @@ ifeq ($(HAVE_SPHINX),1)
mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
done
-else ifeq ($(HAVE_RST2MAN),1)
- $(prerst2man) $(srcdir)/doc $(DOCBUILDDIR)/man
else
@echo "Fatal: build dependency fail."
@false
@@ -79,10 +76,10 @@ endif
# Do not try to build or install man pages if a man page converter is
# not available.
-ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)
+ifeq ($(HAVE_SPHINX),0)
build-man:
install-man:
- @echo "No sphinx or rst2man, will not install man pages."
+ @echo "No sphinx, will not install man pages."
else
build-man: ${MAN_GZIP_FILES}
install-man: ${MAN_GZIP_FILES}
diff --git a/doc/prerst2man.py b/doc/prerst2man.py
deleted file mode 100644
index 968722a1..00000000
--- a/doc/prerst2man.py
+++ /dev/null
@@ -1,64 +0,0 @@
-from sys import argv
-from datetime import date
-from os.path import dirname, isdir
-from os import makedirs, system
-import re
-
-sourcedir = argv[1]
-outdir = argv[2]
-
-if not isdir(outdir):
- makedirs(outdir, 0o755)
-
-with open(sourcedir + "/conf.py") as cf:
- exec(cf.read())
-
-
-def header(file, startdocname, command, description, authors, section):
- file.write("""
-{0:s}
-{1:s}
-{2:s}
-
-:Date: {3:s}
-:Version: {4:s}
-:Manual section: {5:d}
-:Manual group: {6:s}
-
-""".format(
-'-' * len(description),
-description,
-'-' * len(description),
-date.today().isoformat(), release, section, project))
-
-blankre = re.compile("^\s*$")
-for page in man_pages:
- outdirname = outdir + '/' + dirname(page[0])
- if not isdir(outdirname):
- makedirs(outdirname, 0o755)
- filename = outdir + '/' + page[0] + '.rst'
- outfile = open(filename, 'w')
- infile = open(sourcedir + '/' + page[0] + '.rst', 'r')
-
- # this is a crude hack. We look for the first blank line, and
- # insert the rst2man header there.
- #
- # XXX consider really parsing input
-
- count = 0
- lines = infile.readlines()
- for line in lines:
- outfile.write(line)
- if (blankre.match(line)):
- break
- count = count + 1
-
- del lines[0:count + 1]
-
- header(outfile, *page)
-
- outfile.write("".join(lines))
- outfile.close()
-
- system('set -x; rst2man {0} {1}/{2}.{3}'
- .format(filename, outdir, page[0], page[4]))