~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Aaron Bentley
  • Date: 2007-12-25 04:17:50 UTC
  • mto: This revision was merged to the branch mainline in revision 3160.
  • Revision ID: aaron.bentley@utoronto.ca-20071225041750-t6chr3pmgnebvqcz
Handle non-directory parent conflicts (abentley, #177390)

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
34
        $(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
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 \
94
 
        doc/index.txt \
95
 
        doc/index.es.txt
 
90
        doc/index.txt
96
91
non_txt_files := \
97
92
       doc/default.css \
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
173
164
exe:
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
185
176
 
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
210
 
 
211
 
.PHONY: dist dist-upload-escudero check-dist-tarball
212
 
 
213
 
# build a distribution tarball.
214
 
#
215
 
# this method of copying the pyrex generated files is a bit ugly; it would be
216
 
# nicer to generate it from distutils.
217
 
#
218
 
# these are a bit ubuntu-specific.
219
 
dist: 
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 && \
225
 
        $(MAKE) clean && \
226
 
        $(MAKE) && \
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. && \
232
 
        rm -rf $$expbasedir
233
 
 
234
 
# run all tests in a previously built tarball
235
 
check-dist-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 && \
241
 
        rm -rf $$tmpdir
242
 
 
243
 
 
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 \
251
 
                && \
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