File: 0006-Add-substpdf-target.patch

package info (click to toggle)
krb5 1.22.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,652 kB
  • sloc: ansic: 293,109; python: 10,357; cpp: 9,477; makefile: 7,035; sh: 6,189; perl: 1,650; asm: 1,212; yacc: 933; javascript: 789; awk: 344; csh: 147; xml: 135; lisp: 104
file content (39 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From: Ben Kaduk <kaduk@mit.edu>
Date: Fri, 29 Mar 2013 20:53:37 -0400
Subject: Add substpdf target

Akin to substhtml, so that we can build PDF documents without
overwriting the upstream-provided versions and causing debian/rules clean
to not return to the original state.

Patch-Category: debian-local
---
 src/doc/Makefile.in | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index a1b0cff..b32e6b9 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -86,6 +86,21 @@ pdf: $(PDFDIR)
 	 rm -f *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla \
 	)
 
+substpdf: rst_composite
+	$(SPHINX_BUILD) -t pathsubs -b latex -q rst_composite pdf_subst
+	mv pdf_subst/Makefile pdf_subst/GMakefile
+	(cd pdf_subst && \
+	 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.