~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Colin D Bennett
  • Date: 2009-02-12 16:57:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4008.
  • Revision ID: colin@gibibit.com-20090212165739-02xv63odccfmxomw
Generate PDF version of the User Guide.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
clean:
54
54
        $(PYTHON) setup.py clean
55
55
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
 
56
        rm -rf doc/en/user-guide/latex_prepared
56
57
 
57
58
# Build API documentation
58
59
docfiles = bzr bzrlib
111
112
doc/en/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide)) 
112
113
        $(rst2html) --stylesheet=../../default.css doc/en/user-guide/index.txt $@
113
114
 
 
115
# Set the paper size for PDF files.
 
116
# Options:  'a4' (ISO A4 size), 'letter' (US Letter size)
 
117
PAPERSIZE = a4
 
118
PDF_DOCUMENTS := doc/en/user-guide/user-guide.$(PAPERSIZE).pdf
 
119
 
 
120
# Copy and modify the RST sources, and convert SVG images to PDF
 
121
# files for use a images in the LaTeX-generated PDF.
 
122
# Then generate the PDF output from the modified RST sources.
 
123
doc/en/user-guide/user-guide.$(PAPERSIZE).pdf: $(wildcard $(addsuffix /*.txt, doc/en/user-guide)) 
 
124
        mkdir -p doc/en/user-guide/latex_prepared
 
125
        $(PYTHON) tools/prepare_for_latex.py \
 
126
            --out-dir=doc/en/user-guide/latex_prepared \
 
127
            --in-dir=doc/en/user-guide
 
128
        cd doc/en/user-guide/latex_prepared && \
 
129
            $(PYTHON) ../../../../tools/rst2pdf.py \
 
130
                --documentoptions=10pt,$(PAPERSIZE)paper \
 
131
                --input-encoding=UTF-8:strict --output-encoding=UTF-8:strict \
 
132
                --strict --title="Bazaar User Guide" \
 
133
                index.txt ../user-guide.$(PAPERSIZE).pdf
 
134
 
114
135
doc/developers/%.html: doc/developers/%.txt
115
136
        $(rst2html) --stylesheet=../default.css $< $@
116
137
 
153
174
 
154
175
derived_web_docs = $(htm_files) $(dev_htm_files) doc/developers/performance.png
155
176
WEB_DOCS = $(derived_web_docs) $(non_txt_files)
156
 
ALL_DOCS = $(derived_web_docs) $(MAN_PAGES)
 
177
ALL_DOCS = $(derived_web_docs) $(MAN_PAGES) $(PDF_DOCUMENTS)
157
178
 
158
179
# the main target to build all the docs
159
180
docs: $(ALL_DOCS)