31
31
$(PYTHON) setup.py build_ext -i
33
33
check: docs extensions
34
python -Werror -O ./bzr selftest -1v $(tests)
34
$(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
35
35
@echo "Running all tests with no locale."
36
36
LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
48
48
pyflakes bzrlib | grep -v ' imported but unused'
51
$(PYTHON) setup.py clean
52
52
-find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
54
54
# Build API documentation
55
55
docfiles = bzr bzrlib
58
PYTHONPATH=$(PWD) python tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
58
PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
60
PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
60
PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
62
62
# build tags for emacs and vim
74
74
# set PRETTY to get docs that look like the Bazaar web site
76
rst2html := python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid
76
rst2html := $(PYTHON) tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid
78
rst2html := python tools/rst2html.py --link-stylesheet --footnote-references=superscript
78
rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript
81
81
# translate txt docs to html
86
86
doc_dir := doc/en/user-guide
87
87
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
88
88
doc/en/mini-tutorial/index.txt \
89
doc/en/user-reference/hooks.txt \
113
114
tools/doc_generate/autodoc_rstx.py
115
116
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
116
python generate_docs.py -o $@ rstx
117
$(PYTHON) generate_docs.py -o $@ rstx
118
119
doc/en/developer-guide/HACKING.txt: doc/developers/HACKING.txt
119
python tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
120
$(PYTHON) tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
121
122
doc/en/release-notes/NEWS.txt: NEWS
122
python -c "import shutil; shutil.copyfile('$<', '$@')"
123
$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
124
125
MAN_PAGES = man1/bzr.1
125
126
man1/bzr.1: $(MAN_DEPENDENCIES)
126
python generate_docs.py -o $@ man
127
$(PYTHON) generate_docs.py -o $@ man
128
129
# build a png of our performance task list
129
130
doc/developers/performance.png: doc/developers/performance.dot
140
141
# produce a tree containing just the final docs, ready for uploading to the web
141
142
HTMLDIR := html_docs
143
python tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
144
$(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
145
146
# clean produced docs
147
python tools/win32/ostools.py remove $(ALL_DOCS) \
148
$(PYTHON) tools/win32/ostools.py remove $(ALL_DOCS) \
148
149
$(HTMLDIR) $(derived_txt_files)
153
154
# make bzr.exe for win32 with py2exe
155
156
@echo *** Make bzr.exe
156
python setup.py build_ext -i -f
157
python setup.py py2exe > py2exe.log
158
python tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
159
python tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
157
$(PYTHON) setup.py build_ext -i -f
158
$(PYTHON) setup.py py2exe > py2exe.log
159
$(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
160
$(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
161
162
# win32 installer for bzr.exe
162
163
installer: exe copy-docs
164
165
cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
165
166
iscc /Q tools/win32/bzr.iss
167
# win32 python's distutils-based installer
168
# require to have python interpreter installed on win32
168
# win32 Python's distutils-based installer
169
# require to have Python interpreter installed on win32
169
170
python-installer: docs
170
171
python24 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
171
172
python25 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
174
python tools/win32/ostools.py copytodir README win32_bzr.exe/doc
175
python tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
175
$(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc
176
$(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
177
178
# clean on win32 all installer-related files and directories
178
179
clean-win32: clean-docs
179
python tools/win32/ostools.py remove build
180
python tools/win32/ostools.py remove win32_bzr.exe
181
python tools/win32/ostools.py remove py2exe.log
182
python tools/win32/ostools.py remove tools/win32/bzr.iss
183
python tools/win32/ostools.py remove bzr-setup*.exe
184
python tools/win32/ostools.py remove bzr-*win32.exe
185
python tools/win32/ostools.py remove dist
180
$(PYTHON) tools/win32/ostools.py remove build
181
$(PYTHON) tools/win32/ostools.py remove win32_bzr.exe
182
$(PYTHON) tools/win32/ostools.py remove py2exe.log
183
$(PYTHON) tools/win32/ostools.py remove tools/win32/bzr.iss
184
$(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
185
$(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
186
$(PYTHON) tools/win32/ostools.py remove dist