~bzr-pqm/bzr/bzr.dev

1773.4.1 by Martin Pool
Add pyflakes makefile target; fix many warnings
1
all:
1102 by Martin Pool
- merge test refactoring from robertc
2
3
check:
1704.1.1 by Robert Collins
'bzr selftest' now shows a progress bar with the number of tests, and
4
	./bzr selftest -v $(tests)
1526.1.1 by Robert Collins
Run the test suite with no locale as well as the default locale. Also add a test for build_tree_shape to selftest.
5
	@echo "Running all tests with no locale."
1704.1.1 by Robert Collins
'bzr selftest' now shows a progress bar with the number of tests, and
6
	LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -v $(tests)
1102 by Martin Pool
- merge test refactoring from robertc
7
1185.33.72 by Martin Pool
Fix commit message template for non-ascii files, and add test for handling of
8
check-msgeditor:
9
	./bzr --no-plugins selftest -v msgeditor
10
1773.4.1 by Martin Pool
Add pyflakes makefile target; fix many warnings
11
# Run Python style checker (apt-get install pyflakes)
12
pyflakes:
13
	pyflakes bzrlib
14
15
pyflakes-nounused:
16
	# There are many of these warnings at the moment and they're not a
17
	# high priority to fix
18
	pyflakes bzrlib | grep -v ' imported but unused'
19
20
clean:
1185.1.21 by Robert Collins
add a clean target
21
	./setup.py clean
1185.62.18 by John Arbash Meinel
From Jari Alto: Makefile fixes (clean target error suppression)
22
	-find . -name "*.pyc" -o -name "*.pyo" | xargs rm -f
1427 by Robert Collins
clean up test dirs on make clean
23
	rm -rf test????.tmp
1185.1.21 by Robert Collins
add a clean target
24
1102 by Martin Pool
- merge test refactoring from robertc
25
.PHONY: all
1158 by Martin Pool
- make target to build emacs TAGS file
26
27
28
# build emacs cross-reference
29
tag_files=./bzr ./bzrlib/*py ./bzrlib/selftest/*.py
30
TAGS: $(tag_files)
31
	ctags-exuberant -e $(tag_files)
1536.1.1 by Martin Pool
Move in tutorial text from wiki.
32
1821.1.1 by Alexander Belchenko
win32 installer for bzr.dev.0.9
33
34
# make bzr.exe for win32 with py2exe
35
exe:
36
	@echo Make bzr.exe
37
	setup.py py2exe > py2exe.log
38
	copy /Y tools\win32\start_bzr.bat win32_bzr.exe\start_bzr.bat
39
	copy /Y tools\win32\bazaar.url win32_bzr.exe\bazaar.url
40
41
# translate txt docs to html
42
doc_dir := doc 
43
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir)))
44
htm_files := $(patsubst %.txt, %.htm, $(txt_files)) doc/bzr_man.htm
45
46
%.htm: %.txt
47
	rst2html.py --link-stylesheet --stylesheet=default.css $*.txt $*.htm
48
49
doc/bzr_man.txt:
50
	generate_docs.py -o doc/bzr_man.txt rstx
51
52
docs: $(htm_files)
53
54
copy_docs: docs
55
	copy /Y NEWS win32_bzr.exe\NEWS
56
	copy /Y README win32_bzr.exe\README
57
	python tools/win32/copy_docs.py
58
59
# win32 installer for bzr.exe
60
installer: exe copy_docs
61
	@echo Make windows installer
62
	cog.py -d -o tools\win32\bzr.iss tools\win32\bzr.iss.cog
63
	"C:\Program Files\Inno Setup 5\iscc" /Q tools\win32\bzr.iss
64
65
# clean on win32 all installer-related files and directories
66
clean_win32:
67
	if exist build rmdir /S /Q build
68
	if exist win32_bzr.exe rmdir /S /Q win32_bzr.exe
69
	if exist py2exe.log del /Q py2exe.log
70
	if exist doc\*.htm del /Q doc\*.htm
71
	if exist doc\bzr_man.txt del /Q doc\bzr_man.txt
72
	if exist tools\win32\bzr.iss del /Q tools\win32\bzr.iss
73
	if exist bzr-setup*.exe del /Q bzr-setup*.exe