26
29
python setup.py build_ext -i
28
31
check: docs extensions
29
python -Werror ./bzr selftest -v $(tests)
32
python -Werror -O ./bzr selftest -1v $(tests)
30
33
@echo "Running all tests with no locale."
31
LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -v $(tests)
32
python -O -Werror ./bzr selftest -v $(tests)
34
LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
35
37
./bzr --no-plugins selftest -v msgeditor
48
50
-find . -name "*.pyc" -o -name "*.pyo" | xargs rm -f
49
51
rm -rf test????.tmp
53
# Build API documentation
51
54
docfiles = bzr bzrlib
54
57
PYTHONPATH=$(PWD) python tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
57
59
PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
60
61
# build emacs cross-reference
61
62
tag_files=./bzr ./bzrlib/*py ./bzrlib/selftest/*.py
63
64
ctags-exuberant -e $(tag_files)
66
# Produce HTML docs to upload on Canonical server
68
PRETTYDIR := pretty_docs
71
python tools/win32/ostools.py copytodir $(htm_files) doc/default.css $(HTMLDIR)
69
# set PRETTY to get docs that look like the Bazaar web site
71
rst2html := python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid
73
rst2html := python tools/rst2html.py --link-stylesheet --footnote-references=superscript
74
76
# translate txt docs to html
76
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) doc/bzr_man.txt
77
derived_txt_files := \
78
doc/en/user-reference/bzr_man.txt \
79
doc/en/developer-guide/HACKING.txt \
80
doc/en/release-notes/NEWS.txt
81
doc_dir := doc/en/user-guide
82
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
83
doc/en/mini-tutorial/index.txt \
87
doc/en/quick-reference/quick-start-summary.svg
77
88
htm_files := $(patsubst %.txt, %.html, $(txt_files))
78
89
dev_txt_files := $(wildcard $(addsuffix /*.txt, doc/developers))
79
90
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files))
81
pretty-html-docs: pretty_files
84
python -c "import os; os.mkdir('$(PRETTYDIR)')"
86
pretty_files: $(patsubst doc/%.txt, $(PRETTYDIR)/%.html, $(txt_files))
88
92
doc/developers/%.html: doc/developers/%.txt
89
python tools/rst2html.py --link-stylesheet --stylesheet=../default.css --footnote-references=superscript $< $@
93
$(rst2html) --stylesheet=../default.css $< $@
95
doc/index.html: doc/index.txt
96
$(rst2html) --stylesheet=default.css $< $@
92
python tools/rst2html.py --link-stylesheet --stylesheet=default.css --footnote-references=superscript $< $@
94
$(PRETTYDIR)/%.html: pretty_docs doc/%.txt
95
python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid doc/$*.txt \
99
$(rst2html) --stylesheet=../../default.css $< $@
98
101
MAN_DEPENDENCIES = bzrlib/builtins.py \
99
102
bzrlib/bundle/commands.py \
104
107
tools/doc_generate/autodoc_man.py \
105
108
tools/doc_generate/autodoc_rstx.py
107
doc/bzr_man.txt: $(MAN_DEPENDENCIES)
110
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
108
111
python generate_docs.py -o $@ rstx
113
doc/en/developer-guide/HACKING.txt: doc/developers/HACKING.txt
114
python tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
116
doc/en/release-notes/NEWS.txt: NEWS
117
python -c "import shutil; shutil.copyfile('$<', '$@')"
110
119
MAN_PAGES = man1/bzr.1
111
120
man1/bzr.1: $(MAN_DEPENDENCIES)
112
121
python generate_docs.py -o $@ man
114
ALL_DOCS = $(htm_files) $(MAN_PAGES) $(dev_htm_files) doc/developers/performance.png
123
# build a png of our performance task list
124
doc/developers/performance.png: doc/developers/performance.dot
126
@dot -Tpng $< -o$@ || echo "Dot not installed; skipping generation of $@"
128
derived_web_docs = $(htm_files) $(dev_htm_files) doc/developers/performance.png
129
WEB_DOCS = $(derived_web_docs) $(non_txt_files)
130
ALL_DOCS = $(derived_web_docs) $(MAN_PAGES)
132
# the main target to build all the docs
115
133
docs: $(ALL_DOCS)
118
python tools/win32/ostools.py copytodir $(htm_files) \
119
doc/default.css NEWS README \
121
python tools/win32/ostools.py copytodir $(dev_htm_files) \
122
win32_bzr.exe/doc/developers
135
# produce a tree containing just the final docs, ready for uploading to the web
138
python tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
124
140
# clean produced docs
126
142
python tools/win32/ostools.py remove $(ALL_DOCS) \
127
$(HTMLDIR) $(PRETTYDIR) doc/bzr_man.txt
130
# build a png of our performance task list
131
doc/developers/performance.png: doc/developers/performance.dot
133
@dot -Tpng $< -o$@ || echo "Dot not installed; skipping generation of $@"
143
$(HTMLDIR) $(derived_txt_files)
146
### Windows Support ###
136
148
# make bzr.exe for win32 with py2exe
153
165
python24 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
154
166
python25 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
169
python tools/win32/ostools.py copytodir README win32_bzr.exe/doc
170
python tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
157
172
# clean on win32 all installer-related files and directories
158
173
clean-win32: clean-docs
159
174
python tools/win32/ostools.py remove build
160
175
python tools/win32/ostools.py remove win32_bzr.exe
161
176
python tools/win32/ostools.py remove py2exe.log
162
python tools/win32/ostools.py remove doc/bzr_man.txt
163
177
python tools/win32/ostools.py remove tools/win32/bzr.iss
164
178
python tools/win32/ostools.py remove bzr-setup*.exe
165
179
python tools/win32/ostools.py remove bzr-*win32.exe