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
admin-guide-full:: admin-guide admin-guide-info admin-guide-html
.PHONY: admin-guide
-admin-guide:: admin-guide.ps
+admin-guide:: admin-guide.ps admin-guide.pdf
admin-guide.ps: $(ADMIN_DEPS)
$(DVI) admin.texinfo
install-guide-full:: install-guide install-guide-info install-guide-html
.PHONY: install-guide
-install-guide:: install-guide.ps
+install-guide:: install-guide.ps install-guide.pdf
install-guide.ps: $(INSTALL_DEPS)
$(DVI) install.texinfo
user-guide-full:: user-guide user-guide-info user-guide-html
.PHONY: user-guide
-user-guide:: user-guide.ps
+user-guide:: user-guide.ps user-guide.pdf
user-guide.ps: $(USER_GUIDE_DEPS)
$(DVI) user-guide.texinfo
../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)