68
68
### Documentation ###
70
# set PRETTY to get docs that look like the Bazaar web site
72
rst2html := python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid
74
rst2html := python tools/rst2html.py --link-stylesheet --footnote-references=superscript
70
77
# translate txt docs to html
71
78
derived_txt_files := \
72
79
doc/en/user-reference/bzr_man.txt \
76
83
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
77
84
doc/en/mini-tutorial/index.txt \
88
doc/en/quick-reference/quick-start-summary.svg
79
89
htm_files := $(patsubst %.txt, %.html, $(txt_files))
80
90
dev_txt_files := $(wildcard $(addsuffix /*.txt, doc/developers))
81
91
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files))
83
93
doc/developers/%.html: doc/developers/%.txt
84
python tools/rst2html.py --link-stylesheet --stylesheet=../default.css --footnote-references=superscript $< $@
94
$(rst2html) --stylesheet=../default.css $< $@
86
96
doc/index.html: doc/index.txt
87
python tools/rst2html.py --link-stylesheet --stylesheet=default.css --footnote-references=superscript $< $@
97
$(rst2html) --stylesheet=default.css $< $@
90
python tools/rst2html.py --link-stylesheet --stylesheet=../../default.css --footnote-references=superscript $< $@
100
$(rst2html) --stylesheet=../../default.css $< $@
92
102
MAN_DEPENDENCIES = bzrlib/builtins.py \
93
103
bzrlib/bundle/commands.py \
111
121
man1/bzr.1: $(MAN_DEPENDENCIES)
112
122
python generate_docs.py -o $@ man
114
WEB_DOCS = $(htm_files) $(dev_htm_files) \
116
doc/en/quick-reference/quick-start-summary.svg \
117
doc/developers/performance.png
118
ALL_DOCS = $(WEB_DOCS) $(MAN_PAGES)
121
124
# build a png of our performance task list
122
125
doc/developers/performance.png: doc/developers/performance.dot
123
126
@echo Generating $@
124
127
@dot -Tpng $< -o$@ || echo "Dot not installed; skipping generation of $@"
127
### Pretty Documentation ###
129
derived_web_docs = $(htm_files) $(dev_htm_files) doc/developers/performance.png
130
WEB_DOCS = $(derived_web_docs) $(non_txt_files)
131
ALL_DOCS = $(derived_web_docs) $(MAN_PAGES)
133
# the main target to build all the docs
136
# produce a tree containing just the final docs, ready for uploading to the web
129
137
HTMLDIR := html_docs
130
PRETTYDIR := pretty_docs
132
# Produce HTML docs to upload on Canonical server
134
139
python tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
136
$(PRETTYDIR)/%.html: pretty_docs doc/%.txt
137
python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid doc/$*.txt \
140
pretty-html-docs: pretty_files
143
python -c "import os; os.mkdir('$(PRETTYDIR)')"
145
pretty_files: $(patsubst doc/%.txt, $(PRETTYDIR)/%.html, $(txt_files))
147
141
# clean produced docs
149
143
python tools/win32/ostools.py remove $(ALL_DOCS) \
150
$(HTMLDIR) $(PRETTYDIR) $(derived_txt_files)
144
$(HTMLDIR) $(derived_txt_files)
153
147
### Windows Support ###