~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Martin Pool
  • Date: 2005-09-30 05:56:05 UTC
  • mto: (1185.14.2)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: mbp@sourcefrog.net-20050930055605-a2c534529b392a7d
- fix upgrade for transport changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
all:
 
1
all: executables
 
2
 
 
3
executables:
 
4
        chmod u+x ./bzr
 
5
        chmod u+x ./setup.py
2
6
 
3
7
check:
4
 
        python -Werror ./bzr selftest -v $(tests)
5
 
        @echo "Running all tests with no locale."
6
 
        LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -v $(tests)
7
 
        python -O -Werror ./bzr selftest -v $(tests)
8
 
 
9
 
check-msgeditor:
10
 
        ./bzr --no-plugins selftest -v msgeditor
11
 
 
12
 
# Run Python style checker (apt-get install pyflakes)
13
 
pyflakes:
14
 
        pyflakes bzrlib
15
 
 
16
 
pyflakes-nounused:
17
 
        # There are many of these warnings at the moment and they're not a
18
 
        # high priority to fix
19
 
        pyflakes bzrlib | grep -v ' imported but unused'
20
 
 
21
 
clean:
 
8
        ./bzr selftest
 
9
 
 
10
clean: executables
22
11
        ./setup.py clean
23
 
        -find . -name "*.pyc" -o -name "*.pyo" | xargs rm -f
24
 
        rm -rf test????.tmp
25
12
 
26
13
.PHONY: all
27
14
 
30
17
tag_files=./bzr ./bzrlib/*py ./bzrlib/selftest/*.py
31
18
TAGS: $(tag_files)
32
19
        ctags-exuberant -e $(tag_files)
33
 
 
34
 
 
35
 
# Produce HTML docs to upload on Canonical server
36
 
HTMLDIR := html_docs
37
 
PRETTYDIR := pretty_docs
38
 
 
39
 
html-docs: docs
40
 
        python tools/win32/ostools.py copytodir $(htm_files) doc/default.css $(HTMLDIR)
41
 
 
42
 
 
43
 
# translate txt docs to html
44
 
doc_dir := doc 
45
 
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) doc/bzr_man.txt
46
 
htm_files := $(patsubst %.txt, %.htm, $(txt_files)) 
47
 
 
48
 
pretty-html-docs: pretty_files
49
 
 
50
 
pretty_docs:
51
 
        python -c "import os; os.mkdir('$(PRETTYDIR)')"
52
 
 
53
 
pretty_files: $(patsubst doc/%.txt, $(PRETTYDIR)/%.htm, $(txt_files))
54
 
 
55
 
doc/%.htm: doc/%.txt
56
 
        python tools/rst2html.py --link-stylesheet --stylesheet=default.css doc/$*.txt doc/$*.htm
57
 
 
58
 
$(PRETTYDIR)/%.htm: pretty_docs doc/%.txt
59
 
        python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid doc/$*.txt \
60
 
        $(PRETTYDIR)/$*.htm
61
 
 
62
 
doc/bzr_man.txt: bzrlib/builtins.py \
63
 
                 bzrlib/bundle/commands.py \
64
 
                 bzrlib/conflicts.py \
65
 
                 bzrlib/sign_my_commits.py \
66
 
                 generate_docs.py \
67
 
                 tools/doc_generate/__init__.py \
68
 
                 tools/doc_generate/autodoc_rstx.py
69
 
        python generate_docs.py -o doc/bzr_man.txt rstx
70
 
 
71
 
docs: $(htm_files)
72
 
 
73
 
copy-docs: docs
74
 
        python tools/win32/ostools.py copytodir $(htm_files) doc/default.css NEWS README  win32_bzr.exe/doc
75
 
 
76
 
# clean produced docs
77
 
clean-docs:
78
 
        python tools/win32/ostools.py remove doc/bzr_man.txt $(htm_files) \
79
 
        $(HTMLDIR) $(PRETTYDIR)
80
 
 
81
 
 
82
 
# make bzr.exe for win32 with py2exe
83
 
exe:
84
 
        @echo *** Make bzr.exe
85
 
        python setup.py py2exe > py2exe.log
86
 
        python tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
87
 
        python tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
88
 
 
89
 
# win32 installer for bzr.exe
90
 
installer: exe copy-docs
91
 
        @echo *** Make windows installer
92
 
        cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
93
 
        iscc /Q tools/win32/bzr.iss
94
 
 
95
 
# win32 python's distutils-based installer
96
 
# require to have python interpreter installed on win32
97
 
python-installer: docs
98
 
        python setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
99
 
 
100
 
 
101
 
# clean on win32 all installer-related files and directories
102
 
clean-win32:
103
 
        python tools/win32/ostools.py remove build
104
 
        python tools/win32/ostools.py remove win32_bzr.exe
105
 
        python tools/win32/ostools.py remove py2exe.log
106
 
        python tools/win32/ostools.py remove doc/*.htm
107
 
        python tools/win32/ostools.py remove doc/bzr_man.txt
108
 
        python tools/win32/ostools.py remove tools/win32/bzr.iss
109
 
        python tools/win32/ostools.py remove bzr-setup*.exe
110
 
        python tools/win32/ostools.py remove bzr-*win32.exe
111
 
        python tools/win32/ostools.py remove dist