summaryrefslogtreecommitdiffstats
path: root/src/doc/Makefile.in
blob: 6222e21971d43f1bb2b89ac6a5b1c83ac4411125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
mydir=doc
BUILDTOP=$(REL)..

SPHINX_BUILD=sphinx-build

docsrc=$(top_srcdir)/../doc
mansrc=$(top_srcdir)/man

# The file editing loop deletes some trailing whitespace that the
# docutils manpage writer outputs near the end of its output files.
rstman::
	$(RM) -r mantmp && mkdir mantmp
	$(SPHINX_BUILD) -q -t mansubs -b man $(docsrc)/rst_source mantmp
	for f in mantmp/*.[0-9]; do \
		name=`echo $$f | sed -e 's|^.*/\(.*\)\.[0-9]$$|\1|'`; \
		sed -e '/^\.\\" $$/d' $$f > $(mansrc)/$$name.man; \
	done

clean::
	$(RM) -r mantmp