summaryrefslogtreecommitdiffstats
path: root/src/doc
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2012-10-15 17:47:33 -0400
committerBen Kaduk <kaduk@mit.edu>2012-10-15 18:53:25 -0400
commite9dc672b8b3af28fa8ea71e866a7c376b4c443d7 (patch)
tree83f4658958334d6c636b47b1cfb3207fc5712be4 /src/doc
parent986a5759d97ef5eb5b874412b33ccbb0214a4d53 (diff)
downloadkrb5-e9dc672b8b3af28fa8ea71e866a7c376b4c443d7.tar.gz
krb5-e9dc672b8b3af28fa8ea71e866a7c376b4c443d7.tar.xz
krb5-e9dc672b8b3af28fa8ea71e866a7c376b4c443d7.zip
Make rules for building NOTICE from RST
Sphinx-build wants to scan over all the sources in the source dir, and its text output engine does not handle the spanning row cells used in some of our fancy tables, so it will crash if we attempt to generate text output from our full suite of documents. We could work around this by attempting to just compile the one source file as an additional argument to sphinx-build, but this seems to insist on producing an index.txt as well as a notice.txt. Furthermore, we cannot use the same conf.py as in rst_composite because the paths substitutions are not available with just the minimal contents of rst_notice. Make a copy and remove the irrelevant parts, for now, changing only the master_doc field as appropriate. For the HTML build, we use the standard |copy| macro from isonum.txt to get the unicode copyright symbol glyph, but for ASCII output we prefer to just use the literal "(C)". ticket: 7407
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/Makefile.in25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index d87a87c96..e961f902a 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -29,10 +29,16 @@ substhtml: composite paths.py
cp paths.py rst_composite
$(SPHINX_BUILD) -t pathsubs -q rst_composite rst_html_subst
+# Create an ASCII (okay, UTF-8) version of the NOTICE file
+notice.txt: rst_notice
+ $(SPHINX_BUILD) -b text -q rst_notice .
+
+NOTICE: notice.txt
+ cp notice.txt $(top_srcdir)/../NOTICE
+
# Use doxygen to generate API documentation, translate it into RST
-# format, and then create a composite of $(docsrc)/rst_source, the
-# generated files, and the NOTICE file in rst_composite. Used by the
-# rsthtml and substhtml targets.
+# format, and then create a composite of $(docsrc)/rst_source and the
+# generated files in rst_composite. Used by the rsthtml and substhtml targets.
composite: Doxyfile
rm -rf doxy rst_apiref rst_composite
$(DOXYGEN)
@@ -42,7 +48,15 @@ composite: Doxyfile
cp rst_apiref/*.rst rst_composite/krb_appldev/refs/api
cp rst_apiref/types/*.rst rst_composite/krb_appldev/refs/types
cp rst_apiref/macros/*.rst rst_composite/krb_appldev/refs/macros
- cp $(top_srcdir)/../NOTICE rst_composite
+
+# Must use a separate source dir for sphinx text builds, since the text
+# engine cannot handle the row spanning cells in fancy tables that we use
+rst_notice: $(docsrc)/notice.rst $(docsrc)/txt_conf.py
+ mkdir -p rst_notice
+ # reST needs backslashes before parens in this macro definition.
+ sed -e 's/include:: <isonum.txt>/|copy| replace:: \\(C\\)/' \
+ < $(docsrc)/rst_source/notice.rst > rst_notice/notice.rst
+ cp $(docsrc)/rst_source/txt_conf.py rst_notice/conf.py
Doxyfile: $(srcdir)/Doxyfile.in
sed -e 's|@SRC@|$(top_srcdir)|g' \
@@ -60,4 +74,5 @@ paths.py:
echo 'ckeytab = "``$(DEFCKTNAME)``"' >> $@
clean::
- rm -rf doxy rst_apiref rst_composite rst_html_subst Doxyfile paths.py
+ rm -rf doxy rst_apiref rst_composite rst_notice rst_html_subst \
+ Doxyfile paths.py