~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Vincent Ladeuil
  • Date: 2007-11-04 15:24:27 UTC
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071104152427-p9k7e4toywa87wfc
Review feedback.

* doc/en/user-guide/authentication_conf.txt: 
New file. Authentication configuration file documentation.

* doc/en/user-guide/configuration.txt: 
Slight modifications, add authentication.conf reference.

* doc/en/mini-tutorial/index.txt: 
Fix make docs warning.

* doc/developers/authentication-ring.txt: 
Small cleanups noticed during
doc/en/user-guide/authentication_conf.txt redaction.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib._perform): Use a dict() instead of {} syntax.

* bzrlib/tests/blackbox/test_whoami.py:
(TestWhoami.test_whoami_branch): Delete BZREMAIL related tests.

* bzrlib/config.py:
(Config.username): BZREMAIL deleted, has been obsolete for more
than a year.
(AuthenticationConfig.__init__): Review feedback, since keeping a
callback as an attribute is useless, call it now and keep the
filename itself as an attribute.
(AuthenticationConfig.get_credentials): Use a dict() instead of {}
syntax.

* NEWS: 
Updated as per Martin's suggestion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
21
21
### Core Stuff ###
22
22
 
23
23
PYTHON=python
24
 
PYTHON_BUILDFLAGS=
25
24
 
26
25
.PHONY: all clean extensions pyflakes api-docs
27
26
 
29
28
 
30
29
extensions:
31
30
        @echo "building extension modules."
32
 
        $(PYTHON) setup.py build_ext -i $(PYTHON_BUILDFLAGS)
 
31
        $(PYTHON) setup.py build_ext -i
33
32
 
34
33
check: docs extensions
35
 
        $(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
 
34
        python -Werror -O ./bzr selftest -1v $(tests)
36
35
        @echo "Running all tests with no locale."
37
36
        LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
38
37
 
49
48
        pyflakes bzrlib | grep -v ' imported but unused'
50
49
 
51
50
clean:
52
 
        $(PYTHON) setup.py clean
 
51
        python setup.py clean
53
52
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
54
53
 
55
54
# Build API documentation
56
55
docfiles = bzr bzrlib
57
56
api-docs:
58
57
        mkdir -p api/html
59
 
        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
59
check-api-docs:
61
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
 
60
        PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
62
61
 
63
62
# build tags for emacs and vim
64
63
TAGS:
74
73
 
75
74
# set PRETTY to get docs that look like the Bazaar web site
76
75
ifdef PRETTY
77
 
rst2html := $(PYTHON) tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid 
 
76
rst2html := python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid 
78
77
else
79
 
rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning
 
78
rst2html := python tools/rst2html.py --link-stylesheet --footnote-references=superscript 
80
79
endif
81
80
 
82
81
# translate txt docs to html
84
83
        doc/en/user-reference/bzr_man.txt \
85
84
        doc/en/developer-guide/HACKING.txt \
86
85
        doc/en/release-notes/NEWS.txt
87
 
txt_files := $(wildcard doc/en/tutorials/*.txt) \
88
 
        $(derived_txt_files) \
89
 
        doc/en/user-guide/index.txt \
 
86
doc_dir := doc/en/user-guide
 
87
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
90
88
        doc/en/mini-tutorial/index.txt \
91
 
        $(wildcard doc/es/guia-usario/*.txt) \
92
 
        doc/es/mini-tutorial/index.txt \
93
 
        doc/index.txt \
94
 
        doc/index.es.txt
 
89
        doc/index.txt
95
90
non_txt_files := \
96
91
       doc/default.css \
97
 
       doc/en/quick-reference/quick-start-summary.svg \
98
 
       doc/en/quick-reference/quick-start-summary.png \
99
 
       doc/en/quick-reference/quick-start-summary.pdf \
100
 
       $(wildcard doc/en/user-guide/images/*.png) \
101
 
       doc/es/referencia-rapida/referencia-rapida.svg \
102
 
       doc/es/referencia-rapida/referencia-rapida.png \
103
 
       doc/es/referencia-rapida/referencia-rapida.pdf \
104
 
       $(wildcard doc/es/guia-usuario/images/*.png)
 
92
       doc/en/quick-reference/quick-start-summary.svg
105
93
htm_files := $(patsubst %.txt, %.html, $(txt_files)) 
106
94
dev_txt_files := $(wildcard $(addsuffix /*.txt, doc/developers))
107
95
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files)) 
108
96
 
109
 
doc/en/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide)) 
110
 
        $(rst2html) --stylesheet=../../default.css doc/en/user-guide/index.txt $@
111
 
 
112
97
doc/developers/%.html: doc/developers/%.txt
113
98
        $(rst2html) --stylesheet=../default.css $< $@
114
99
 
121
106
MAN_DEPENDENCIES = bzrlib/builtins.py \
122
107
                 bzrlib/bundle/commands.py \
123
108
                 bzrlib/conflicts.py \
124
 
                 bzrlib/help_topics/__init__.py \
125
109
                 bzrlib/sign_my_commits.py \
126
 
                 bzrlib/bugtracker.py \
127
110
                 generate_docs.py \
128
111
                 tools/doc_generate/__init__.py \
129
112
                 tools/doc_generate/autodoc_man.py \
130
 
                 tools/doc_generate/autodoc_rstx.py \
131
 
                 $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en)) 
 
113
                 tools/doc_generate/autodoc_rstx.py
132
114
 
133
115
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
134
 
        $(PYTHON) generate_docs.py -o $@ rstx
 
116
        python generate_docs.py -o $@ rstx
135
117
 
136
118
doc/en/developer-guide/HACKING.txt: doc/developers/HACKING.txt
137
 
        $(PYTHON) tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
 
119
        python tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
138
120
 
139
121
doc/en/release-notes/NEWS.txt: NEWS
140
 
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
122
        python -c "import shutil; shutil.copyfile('$<', '$@')"
141
123
 
142
124
MAN_PAGES = man1/bzr.1
143
125
man1/bzr.1: $(MAN_DEPENDENCIES)
144
 
        $(PYTHON) generate_docs.py -o $@ man
 
126
        python generate_docs.py -o $@ man
145
127
 
146
128
# build a png of our performance task list
147
129
doc/developers/performance.png: doc/developers/performance.dot
158
140
# produce a tree containing just the final docs, ready for uploading to the web
159
141
HTMLDIR := html_docs
160
142
html-docs: docs
161
 
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
 
143
        python tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
162
144
 
163
145
# clean produced docs
164
146
clean-docs:
165
 
        $(PYTHON) tools/win32/ostools.py remove $(ALL_DOCS) \
 
147
        python tools/win32/ostools.py remove $(ALL_DOCS) \
166
148
        $(HTMLDIR) $(derived_txt_files)
167
149
 
168
150
 
171
153
# make bzr.exe for win32 with py2exe
172
154
exe:
173
155
        @echo *** Make bzr.exe
174
 
        $(PYTHON) setup.py build_ext -i -f $(PYTHON_BUILDFLAGS)
175
 
        $(PYTHON) setup.py py2exe > py2exe.log
176
 
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
177
 
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_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
178
160
 
179
161
# win32 installer for bzr.exe
180
162
installer: exe copy-docs
181
163
        @echo *** Make windows installer
182
 
        $(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
 
164
        cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
183
165
        iscc /Q tools/win32/bzr.iss
184
166
 
185
 
# win32 Python's distutils-based installer
186
 
# require to have Python interpreter installed on win32
187
 
py-inst-24: docs
 
167
# win32 python's distutils-based installer
 
168
# require to have python interpreter installed on win32
 
169
python-installer: docs
188
170
        python24 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
189
 
 
190
 
py-inst-25: docs
191
171
        python25 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
192
172
 
193
 
python-installer: py-inst-24 py-inst-25
194
 
 
195
 
 
196
173
copy-docs: docs
197
 
        $(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc
198
 
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
 
174
        python tools/win32/ostools.py copytodir README win32_bzr.exe/doc
 
175
        python tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
199
176
 
200
177
# clean on win32 all installer-related files and directories
201
178
clean-win32: clean-docs
202
 
        $(PYTHON) tools/win32/ostools.py remove build
203
 
        $(PYTHON) tools/win32/ostools.py remove win32_bzr.exe
204
 
        $(PYTHON) tools/win32/ostools.py remove py2exe.log
205
 
        $(PYTHON) tools/win32/ostools.py remove tools/win32/bzr.iss
206
 
        $(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
207
 
        $(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
208
 
        $(PYTHON) tools/win32/ostools.py remove dist
209
 
 
210
 
.PHONY: dist dist-upload-escudero check-dist-tarball
211
 
 
212
 
# build a distribution tarball.
213
 
#
214
 
# this method of copying the pyrex generated files is a bit ugly; it would be
215
 
# nicer to generate it from distutils.
216
 
#
217
 
# these are a bit ubuntu-specific.
218
 
dist: 
219
 
        version=`./bzr version --short` && \
220
 
        echo Building distribution of bzr $$version && \
221
 
        expbasedir=`mktemp -t -d tmp_bzr_dist.XXXXXXXXXX` && \
222
 
        expdir=$$expbasedir/bzr-$$version && \
223
 
        tarball=$$PWD/../bzr-$$version.tar.gz && \
224
 
        $(MAKE) clean && \
225
 
        $(MAKE) && \
226
 
        bzr export $$expdir && \
227
 
        cp bzrlib/*.c $$expdir/bzrlib/. && \
228
 
        tar cfz $$tarball -C $$expbasedir bzr-$$version && \
229
 
        gpg --detach-sign $$tarball && \
230
 
        echo $$tarball done. && \
231
 
        rm -rf $$expbasedir
232
 
 
233
 
# run all tests in a previously built tarball
234
 
check-dist-tarball:
235
 
        tmpdir=`mktemp -t -d tmp_bzr_check_dist.XXXXXXXXXX` && \
236
 
        version=`./bzr version --short` && \
237
 
        tarball=$$PWD/../bzr-$$version.tar.gz && \
238
 
        tar Cxz $$tmpdir -f $$tarball && \
239
 
        $(MAKE) -C $$tmpdir/bzr-$$version check && \
240
 
        rm -rf $$tmpdir
241
 
 
242
 
 
243
 
# upload previously built tarball to the download directory on bazaar-vcs.org,
244
 
# and verify that it can be downloaded ok.
245
 
dist-upload-escudero:
246
 
        version=`./bzr version --short` && \
247
 
        tarball=../bzr-$$version.tar.gz && \
248
 
        scp $$tarball $$tarball.sig \
249
 
            escudero.ubuntu.com:/srv/bazaar.canonical.com/www/releases/src \
250
 
                && \
251
 
        echo verifying over http... && \
252
 
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz \
253
 
                | diff -s - $$tarball && \
254
 
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz.sig \
255
 
                | diff -s - $$tarball.sig 
 
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