1
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
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
83
82
derived_txt_files := \
84
83
doc/en/user-reference/bzr_man.txt \
85
84
doc/en/developer-guide/HACKING.txt \
86
doc/en/developer-guide/testing.txt \
87
85
doc/en/release-notes/NEWS.txt
88
txt_files := $(wildcard doc/en/tutorials/*.txt) \
89
$(derived_txt_files) \
86
doc_dir := doc/en/tutorials
87
txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
90
88
doc/en/user-guide/index.txt \
91
89
doc/en/mini-tutorial/index.txt \
92
$(wildcard doc/es/guia-usario/*.txt) \
93
doc/es/mini-tutorial/index.txt \
98
93
doc/en/quick-reference/quick-start-summary.svg \
99
94
doc/en/quick-reference/quick-start-summary.png \
100
95
doc/en/quick-reference/quick-start-summary.pdf \
101
$(wildcard doc/en/user-guide/images/*.png) \
102
doc/es/referencia-rapida/referencia-rapida.svg \
103
doc/es/referencia-rapida/referencia-rapida.png \
104
doc/es/referencia-rapida/referencia-rapida.pdf \
105
$(wildcard doc/es/guia-usuario/images/*.png)
96
$(wildcard doc/en/user-guide/images/*.png)
106
97
htm_files := $(patsubst %.txt, %.html, $(txt_files))
107
98
dev_txt_files := $(wildcard $(addsuffix /*.txt, doc/developers))
108
99
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files))
172
163
# make bzr.exe for win32 with py2exe
174
165
@echo *** Make bzr.exe
175
$(PYTHON) setup.py build_ext -i -f $(PYTHON_BUILDFLAGS)
166
$(PYTHON) setup.py build_ext -i -f
176
167
$(PYTHON) setup.py py2exe > py2exe.log
177
168
$(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
178
169
$(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
180
171
# win32 installer for bzr.exe
181
172
installer: exe copy-docs
182
173
@echo *** Make windows installer
183
$(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
174
cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
184
175
iscc /Q tools/win32/bzr.iss
186
177
# win32 Python's distutils-based installer
207
198
$(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
208
199
$(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
209
200
$(PYTHON) tools/win32/ostools.py remove dist
211
.PHONY: dist dist-upload-escudero check-dist-tarball
213
# build a distribution tarball.
215
# this method of copying the pyrex generated files is a bit ugly; it would be
216
# nicer to generate it from distutils.
218
# these are a bit ubuntu-specific.
220
version=`./bzr version --short` && \
221
echo Building distribution of bzr $$version && \
222
expbasedir=`mktemp -t -d tmp_bzr_dist.XXXXXXXXXX` && \
223
expdir=$$expbasedir/bzr-$$version && \
224
tarball=$$PWD/../bzr-$$version.tar.gz && \
227
bzr export $$expdir && \
228
cp bzrlib/*.c $$expdir/bzrlib/. && \
229
tar cfz $$tarball -C $$expbasedir bzr-$$version && \
230
gpg --detach-sign $$tarball && \
231
echo $$tarball done. && \
234
# run all tests in a previously built tarball
236
tmpdir=`mktemp -t -d tmp_bzr_check_dist.XXXXXXXXXX` && \
237
version=`./bzr version --short` && \
238
tarball=$$PWD/../bzr-$$version.tar.gz && \
239
tar Cxz $$tmpdir -f $$tarball && \
240
$(MAKE) -C $$tmpdir/bzr-$$version check && \
244
# upload previously built tarball to the download directory on bazaar-vcs.org,
245
# and verify that it can be downloaded ok.
246
dist-upload-escudero:
247
version=`./bzr version --short` && \
248
tarball=../bzr-$$version.tar.gz && \
249
scp $$tarball $$tarball.sig \
250
escudero.ubuntu.com:/srv/bazaar.canonical.com/www/releases/src \
252
echo verifying over http... && \
253
curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz \
254
| diff -s - $$tarball && \
255
curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz.sig \
256
| diff -s - $$tarball.sig