1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
1
# Copyright (C) 2005-2010 Canonical Ltd
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
166
171
cd doc/en && make htmlhelp
167
172
cd doc/es && make htmlhelp
168
173
cd doc/ru && make htmlhelp
174
cd doc/ja && make htmlhelp
169
175
cd doc/developers && make htmlhelp
172
178
### Documentation Website ###
174
180
# Where to build the website
175
DOC_WEBSITE_BUILD := build_doc_website
181
DOC_WEBSITE_BUILD = build_doc_website
177
183
# Build and package docs into a website, complete with downloads.
178
184
doc-website: html-sphinx pdf-sphinx
179
185
$(PYTHON) tools/package_docs.py doc/en $(DOC_WEBSITE_BUILD)
180
186
$(PYTHON) tools/package_docs.py doc/es $(DOC_WEBSITE_BUILD)
181
187
$(PYTHON) tools/package_docs.py doc/ru $(DOC_WEBSITE_BUILD)
188
$(PYTHON) tools/package_docs.py doc/ja $(DOC_WEBSITE_BUILD)
182
189
$(PYTHON) tools/package_docs.py doc/developers $(DOC_WEBSITE_BUILD)
188
195
# support our "plain" html documentation so that Sphinx is not a hard
189
196
# dependency for packagers on older platforms.
191
rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
198
rst2html = $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
193
200
# translate txt docs to html
194
derived_txt_files := \
195
doc/en/user-reference/bzr_man.txt \
201
derived_txt_files = \
196
202
doc/en/release-notes/NEWS.txt
198
204
doc/en/tutorials/tutorial.txt \
199
205
doc/en/tutorials/using_bazaar_with_launchpad.txt \
200
206
doc/en/tutorials/centralized_workflow.txt \
201
207
$(wildcard doc/es/tutorials/*.txt) \
202
$(wildcard doc/ru/tutorials/*.txt) \
208
$(wildcard doc/ru/tutorials/*.txt) \
209
doc/ja/tutorials/tutorial.txt \
210
doc/ja/tutorials/using_bazaar_with_launchpad.txt \
211
doc/ja/tutorials/centralized_workflow.txt \
203
212
$(wildcard doc/*/mini-tutorial/index.txt) \
204
213
$(wildcard doc/*/user-guide/index-plain.txt) \
214
doc/en/admin-guide/index-plain.txt \
205
215
$(wildcard doc/es/guia-usario/*.txt) \
206
216
$(derived_txt_files) \
207
217
doc/en/upgrade-guide/index.txt \
209
219
$(wildcard doc/index.*.txt)
211
221
doc/en/user-guide/index.txt \
212
222
doc/es/user-guide/index.txt \
213
doc/ru/user-guide/index.txt
214
txt_files := $(filter-out $(txt_nohtml), $(txt_all))
215
htm_files := $(patsubst %.txt, %.html, $(txt_files))
223
doc/ja/user-guide/index.txt \
224
doc/ru/user-guide/index.txt \
225
doc/en/admin-guide/index.txt
226
txt_files = $(filter-out $(txt_nohtml), $(txt_all))
227
htm_files = $(patsubst %.txt, %.html, $(txt_files))
218
230
doc/default.css \
219
231
$(wildcard doc/*/bzr-en-quick-reference.svg) \
220
232
$(wildcard doc/*/bzr-en-quick-reference.png) \
255
267
doc/developers/status.txt \
256
268
doc/developers/uncommit.txt
258
dev_txt_all := $(wildcard $(addsuffix /*.txt, doc/developers))
259
dev_txt_files := $(filter-out $(dev_txt_nohtml), $(dev_txt_all))
260
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files))
270
dev_txt_all = $(wildcard $(addsuffix /*.txt, doc/developers))
271
dev_txt_files = $(filter-out $(dev_txt_nohtml), $(dev_txt_all))
272
dev_htm_files = $(patsubst %.txt, %.html, $(dev_txt_files))
262
274
doc/en/user-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide))
263
275
$(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
268
280
#doc/ru/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/ru/user-guide))
269
281
# $(rst2html) --stylesheet=../../default.css $(dir $@)index.txt $@
283
doc/en/admin-guide/index-plain.html: $(wildcard $(addsuffix /*.txt, doc/en/admin-guide))
284
$(rst2html) --stylesheet=../../default.css $(dir $@)index-plain.txt $@
271
286
doc/developers/%.html: doc/developers/%.txt
272
287
$(rst2html) --stylesheet=../default.css $< $@
281
296
$(rst2html) --stylesheet=../../default.css $< $@
283
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
284
$(PYTHON) tools/generate_docs.py -o $@ rstx
286
298
doc/en/release-notes/NEWS.txt: NEWS
287
299
$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
325
337
# These are files that need to be copied into the build location to boostrap
326
338
# the build process.
327
339
# Note that the path is relative to tools/win32
328
BUILDOUT_FILES := buildout.cfg \
340
BUILDOUT_FILES = buildout.cfg \
329
341
buildout-templates/bin/build-installer.bat.in \
330
342
ostools.py bootstrap.py