From 2e0b389f84baf224d259247feced6f3b9741e3b0 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 28 Mar 2012 02:03:45 +0000 Subject: [PATCH] Move rstman build target to man directory rstman makes more sense in man than in doc, so move it there. Remove the rstman target from the top-level doc Makefile to avoid confusion. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25792 dc483132-0cff-0310-8789-dd5450dbe970 --- doc/Makefile | 15 --------------- doc/rst_source/relay/build_this.rst | 7 ++++++- src/doc/Makefile.in | 13 +------------ src/man/Makefile.in | 19 ++++++++++++++++++- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 0b8cd45d7..599da3f6c 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 233ec75c8..4eda5d050 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 5c5ba297e..ed3122082 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 2ba1e3a59..c9c58850c 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 -- 2.26.2