From f309175aeb7cee90bc1537ccc871e5b2221dac87 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 23 Mar 2012 16:27:05 +0000 Subject: Install path-substituted man pages Introduce src/doc/Makefile.in, which will eventually subsume doc/Makefile (but will still pull sources from doc). In the rstman target there, create man pages with symbolic path references (like @SBINDIR@). In man/Makefile.in, substitute the path references with the configured paths before installing. Man pages generated from RST source are now checked into the source tree under the name filename.man. This lets us use a single implicit .man.sub rule for the path substitutions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25786 dc483132-0cff-0310-8789-dd5450dbe970 --- src/doc/Makefile.in | 20 ++++++++++++++++++++ src/doc/deps | 1 + 2 files changed, 21 insertions(+) create mode 100644 src/doc/Makefile.in create mode 100644 src/doc/deps (limited to 'src/doc') diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in new file mode 100644 index 0000000000..6222e21971 --- /dev/null +++ b/src/doc/Makefile.in @@ -0,0 +1,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 diff --git a/src/doc/deps b/src/doc/deps new file mode 100644 index 0000000000..2feac3c9d3 --- /dev/null +++ b/src/doc/deps @@ -0,0 +1 @@ +# No dependencies here. -- cgit