1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
# A relatively simple Makefile to assist in building parts of bzr. Mostly for
18
# building documentation, etc.
20
.PHONY: all clean extensions pyflakes api-docs
25
@echo "building extension modules."
26
./setup.py build_ext -i
4
29
python -Werror ./bzr selftest -v $(tests)
5
30
@echo "Running all tests with no locale."
6
31
LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -v $(tests)
23
48
-find . -name "*.pyc" -o -name "*.pyo" | xargs rm -f
24
49
rm -rf test????.tmp
54
PYTHONPATH=$(PWD) python tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
57
PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
29
60
# build emacs cross-reference
62
93
python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid doc/$*.txt \
63
94
$(PRETTYDIR)/$*.htm
65
doc/bzr_man.txt: bzrlib/builtins.py \
96
MAN_DEPENDENCIES = bzrlib/builtins.py \
66
97
bzrlib/bundle/commands.py \
67
98
bzrlib/conflicts.py \
68
99
bzrlib/sign_my_commits.py \
69
100
generate_docs.py \
70
101
tools/doc_generate/__init__.py \
71
102
tools/doc_generate/autodoc_rstx.py
72
python generate_docs.py -o doc/bzr_man.txt rstx
74
docs: $(htm_files) doc/HACKING.htm
104
doc/bzr_man.txt: $(MAN_DEPENDENCIES)
105
python generate_docs.py -o $@ rstx
107
MAN_PAGES = man1/bzr.1
108
man1/bzr.1: $(MAN_DEPENDENCIES)
109
python generate_docs.py -o $@ man
111
docs: $(htm_files) $(MAN_PAGES) doc/HACKING.htm
77
114
python tools/win32/ostools.py copytodir $(htm_files) doc/default.css NEWS README win32_bzr.exe/doc
79
116
# clean produced docs
81
python tools/win32/ostools.py remove doc/bzr_man.txt $(htm_files) \
82
$(HTMLDIR) $(PRETTYDIR)
118
python tools/win32/ostools.py remove $(htm_files) \
119
$(HTMLDIR) $(PRETTYDIR) doc/bzr_man.txt $(MAN_PAGES)
85
122
# make bzr.exe for win32 with py2exe