summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/Makefile15
-rw-r--r--doc/rst_source/relay/build_this.rst7
-rw-r--r--src/doc/Makefile.in13
-rw-r--r--src/man/Makefile.in19
4 files changed, 25 insertions, 29 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 0b8cd45d71..599da3f6cf 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -27,8 +27,6 @@ MANPAGES=$(SRCDIR)/clients/kdestroy/kdestroy.M $(SRCDIR)/clients/kinit/kinit.M $
USER_GUIDE_INCLUDES=definitions.texinfo copyright.texinfo glossary.texinfo
USER_GUIDE_DEPS=user-guide.texinfo $(USER_GUIDE_INCLUDES)
-SPHINX_BUILD=sphinx-build
-
.PHONY: all
all:: admin-guide-full install-guide-full user-guide-full clean-temp-ps clean-tex
@@ -157,16 +155,3 @@ tgz::
../NOTICE: notice.texinfo definitions.texinfo copyright.texinfo
makeinfo --plaintext -o $@ notice.texinfo
-
-RSTMAN=k5identity.5 k5login.5 k5srvutil.1 kadmin.1 kadmind.8 kdb5_ldap_util.8 \
- kdb5_util.8 kdc.conf.5 kdestroy.1 kinit.1 klist.1 kpasswd.1 kprop.8 \
- kpropd.8 kproplog.8 krb5.conf.5 krb5kdc.8 ksu.1 kswitch.1 ktutil.1 \
- kvno.1
-
-# The file editing loop deletes some trailing whitespace that the
-# docutils manpage writer outputs near the end of its output files.
-rstman::
- $(SPHINX_BUILD) -q -b man rst_source ../src/man
- (cd ../src/man && for f in $(RSTMAN); do \
- (echo '$$'; echo '?^.." $$?d'; echo 'w'; echo 'q' ) | ed $$f; \
- done)
diff --git a/doc/rst_source/relay/build_this.rst b/doc/rst_source/relay/build_this.rst
index 233ec75c88..4eda5d0506 100644
--- a/doc/rst_source/relay/build_this.rst
+++ b/doc/rst_source/relay/build_this.rst
@@ -31,7 +31,12 @@ Updating man pages
Man pages generated from the RST sources, are checked into the src/man
directory. To regenerate these files, run ``make rstman`` from the
-doc subdir of a configured build tree.
+man subdirectory of a configured build tree. You can also do this
+from an unconfigured source tree with::
+
+ cd src/man
+ make -f Makefile.in top_srcdir=.. srcdir=. rstman
+ make clean
As with the simple build, it is normal to see warnings about missing
files when rebuilding the man pages.
diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index 5c5ba297ec..ed3122082f 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -5,17 +5,6 @@ SPHINX_BUILD=sphinx-build
DOXYGEN=doxygen
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
# Create HTML documentation in $(docsrc)/rst_html suitable for a
# release tarball or the web site (that is, without substitutions for
@@ -47,4 +36,4 @@ Doxyfile: $(srcdir)/Doxyfile.in
-e 's|@DOC@|$(top_srcdir)/../doc|g' $(srcdir)/Doxyfile.in > $@
clean::
- rm -rf rst_man doxy rst_apiref rst_composite Doxyfile
+ rm -rf doxy rst_apiref rst_composite Doxyfile
diff --git a/src/man/Makefile.in b/src/man/Makefile.in
index 2ba1e3a593..c9c58850c1 100644
--- a/src/man/Makefile.in
+++ b/src/man/Makefile.in
@@ -1,6 +1,7 @@
mydir=man
BUILDTOP=$(REL)..
+SPHINX_BUILD=sphinx-build
GROFF=@GROFF@
GROFF_MAN=$(GROFF) -mtty-char -Tascii -mandoc -c
localstatedir=@localstatedir@
@@ -10,6 +11,22 @@ MANSUBS=k5identity.sub k5login.sub k5srvutil.sub kadmin.sub kadmind.sub \
klist.sub kpasswd.sub kprop.sub kpropd.sub kproplog.sub krb5.conf.sub \
krb5kdc.sub ksu.sub kswitch.sub ktutil.sub kvno.sub
+docsrc=$(top_srcdir)/../doc
+
+# Update checked-in man pages from RST sources in the top-level doc
+# directory. This can be done from an unconfigured tree with:
+# make -f Makefile.in top_srcdir=.. srcdir=. rstman
+# make -f Makefile.in clean
+# The sed command deletes some trailing whitespace that the docutils
+# manpage writer outputs near the end of its output files.
+rstman:
+ rm -rf rst_man
+ $(SPHINX_BUILD) -q -t mansubs -b man $(docsrc)/rst_source rst_man
+ for f in rst_man/*.[0-9]; do \
+ name=`echo $$f | sed -e 's|^.*/\(.*\)\.[0-9]$$|\1|'`; \
+ sed -e '/^\.\\" $$/d' $$f > $(srcdir)/$$name.man; \
+ done
+
.SUFFIXES: .man .sub
.man.sub:
@@ -21,7 +38,7 @@ MANSUBS=k5identity.sub k5login.sub k5srvutil.sub kadmin.sub kadmind.sub \
all:: $(MANSUBS)
clean::
- $(RM) $(MANSUBS)
+ rm -rf $(MANSUBS) rst_man
install:: install-clientman install-fileman install-adminman install-serverman