~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Martin Pool
  • Date: 2007-04-24 05:02:04 UTC
  • mfrom: (2449 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2450.
  • Revision ID: mbp@sourcefrog.net-20070424050204-bfkc1qiq0axt5f14
Merge trunk & fix NEWS conflict

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
all:
2
 
 
3
 
check:
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
2
#
 
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.
 
7
#
 
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.
 
12
#
 
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
 
16
 
 
17
# A relatively simple Makefile to assist in building parts of bzr. Mostly for
 
18
# building documentation, etc.
 
19
 
 
20
.PHONY: all clean extensions pyflakes api-docs
 
21
 
 
22
all: extensions
 
23
 
 
24
extensions:
 
25
        @echo "building extension modules."
 
26
        ./setup.py build_ext -i
 
27
 
 
28
check: extensions
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
25
50
 
26
 
.PHONY: all
 
51
docfiles = bzr bzrlib
 
52
api-docs:
 
53
        mkdir -p api/html
 
54
        PYTHONPATH=$(PWD) python tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
 
55
 
 
56
check-api-docs:
 
57
        PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
27
58
 
28
59
 
29
60
# build emacs cross-reference
62
93
        python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid doc/$*.txt \
63
94
        $(PRETTYDIR)/$*.htm
64
95
 
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
73
 
 
74
 
docs: $(htm_files) doc/HACKING.htm
 
103
 
 
104
doc/bzr_man.txt: $(MAN_DEPENDENCIES)
 
105
        python generate_docs.py -o $@ rstx
 
106
 
 
107
MAN_PAGES = man1/bzr.1
 
108
man1/bzr.1: $(MAN_DEPENDENCIES)
 
109
        python generate_docs.py -o $@ man
 
110
 
 
111
docs: $(htm_files) $(MAN_PAGES) doc/HACKING.htm
75
112
 
76
113
copy-docs: docs
77
114
        python tools/win32/ostools.py copytodir $(htm_files) doc/default.css NEWS README  win32_bzr.exe/doc
78
115
 
79
116
# clean produced docs
80
117
clean-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)
83
120
 
84
121
 
85
122
# make bzr.exe for win32 with py2exe