[27268] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit [krb5-1.11]: Make glue for building PDFs

daemon@ATHENA.MIT.EDU (Tom Yu)
Fri Nov 16 14:58:49 2012

Date: Fri, 16 Nov 2012 14:58:23 -0500
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201211161958.qAGJwNja022323@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/12e7827ee9b89d67164cef7aa64416722c0016ad
commit 12e7827ee9b89d67164cef7aa64416722c0016ad
Author: Ben Kaduk <kaduk@mit.edu>
Date:   Tue Oct 16 20:11:14 2012 -0400

    Make glue for building PDFs
    
    sphinx-build's latex output engine creates a subdirectory with
    various latex files, and a Makefile.  The generated Makefile assumes
    gmake, which we do not.  The logic needed in this makefile is rather
    simple, so we just include it in src/doc/Makefile.in, even if we
    do need a rather complicated shell expression to work in the subdirectory.
    
    (cherry picked from commit f06725b7a98c16630f80d8cc1dd6386a7d21a058)
    
    ticket: 7433

 .gitignore          |    1 +
 src/doc/Makefile.in |   26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index 36c4f1a..8ec785d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@ testlog
 /doc/version.py
 
 /doc/html/
+/doc/pdf/
 
 /src/config.log
 /src/config.status
diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index 913a50a..3c5d3f3 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -28,6 +28,10 @@ RST_SOURCES= _static \
 	relay \
 	resources.rst
 
+PDFDIR=$(docsrc)/pdf
+PDFDOCS= admin appdev basic build plugindev user
+LATEXOPTS=
+
 # Create HTML documentation in $(docsrc)/html suitable for a
 # release tarball or the web site (that is, without substitutions for
 # configured paths).  This can be done in an unconfigured source tree
@@ -53,6 +57,28 @@ notice.txt: $(docsrc)/conf.py $(docsrc)/notice.rst
 NOTICE: notice.txt
 	cp notice.txt $(top_srcdir)/../NOTICE
 
+$(PDFDIR): composite
+	$(SPHINX_BUILD) -b latex -q rst_composite $(PDFDIR)
+	# sphinx-build generates a gmake-specific Makefile that we don't use
+	mv $(PDFDIR)/Makefile $(PDFDIR)/GMakefile
+
+# Not pretty.  Can't use a suffix rule .tex.pdf without a Makefile in
+# $(PDFDIR) because pdflatex looks for include files in the current
+# working directory.  The sphinx-build Makefile is quite conservative
+# and runs pdflatex five times; we can be slightly less conservative.
+pdf: $(PDFDIR)
+	(cd $(PDFDIR) && \
+	 for i in $(PDFDOCS); do \
+		texfile=`echo $${i}.tex` && \
+		idxfile=`echo $${i}.idx` && \
+		pdflatex $(LATEXOPTS) $$texfile && \
+		pdflatex $(LATEXOPTS) $$texfile && \
+		makeindex -s python.ist $$idxfile || true; \
+		pdflatex $(LATEXOPTS) $$texfile && \
+		pdflatex $(LATEXOPTS) $$texfile; done && \
+	 rm -f *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla \
+	)
+
 # Use doxygen to generate API documentation, translate it into RST
 # format, and then create a composite of $(docsrc)'s RST and the
 # generated files in rst_composite.  Used by the html and substhtml targets.
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post