~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-03 01:53:30 UTC
  • mfrom: (2955.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071103015330-pt1tec7wyxwwcey8
Fix #158972 don't use timeout for HttpServer

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)
76
75
ifdef PRETTY
77
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/en/user-reference/hooks.txt \
 
90
        doc/index.txt
95
91
non_txt_files := \
96
92
       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)
 
93
       doc/en/quick-reference/quick-start-summary.svg
105
94
htm_files := $(patsubst %.txt, %.html, $(txt_files)) 
106
95
dev_txt_files := $(wildcard $(addsuffix /*.txt, doc/developers))
107
96
dev_htm_files := $(patsubst %.txt, %.html, $(dev_txt_files)) 
108
97
 
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
98
doc/developers/%.html: doc/developers/%.txt
113
99
        $(rst2html) --stylesheet=../default.css $< $@
114
100
 
121
107
MAN_DEPENDENCIES = bzrlib/builtins.py \
122
108
                 bzrlib/bundle/commands.py \
123
109
                 bzrlib/conflicts.py \
124
 
                 bzrlib/help_topics/__init__.py \
125
110
                 bzrlib/sign_my_commits.py \
126
 
                 bzrlib/bugtracker.py \
127
111
                 generate_docs.py \
128
112
                 tools/doc_generate/__init__.py \
129
113
                 tools/doc_generate/autodoc_man.py \
130
 
                 tools/doc_generate/autodoc_rstx.py \
131
 
                 $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en)) 
 
114
                 tools/doc_generate/autodoc_rstx.py
132
115
 
133
116
doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
134
117
        $(PYTHON) generate_docs.py -o $@ rstx
171
154
# make bzr.exe for win32 with py2exe
172
155
exe:
173
156
        @echo *** Make bzr.exe
174
 
        $(PYTHON) setup.py build_ext -i -f $(PYTHON_BUILDFLAGS)
 
157
        $(PYTHON) setup.py build_ext -i -f
175
158
        $(PYTHON) setup.py py2exe > py2exe.log
176
159
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
177
160
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
179
162
# win32 installer for bzr.exe
180
163
installer: exe copy-docs
181
164
        @echo *** Make windows installer
182
 
        $(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
 
165
        cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
183
166
        iscc /Q tools/win32/bzr.iss
184
167
 
185
168
# win32 Python's distutils-based installer
186
169
# require to have Python interpreter installed on win32
187
 
py-inst-24: docs
 
170
python-installer: docs
188
171
        python24 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
189
 
 
190
 
py-inst-25: docs
191
172
        python25 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
192
173
 
193
 
python-installer: py-inst-24 py-inst-25
194
 
 
195
 
 
196
174
copy-docs: docs
197
175
        $(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc
198
176
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
206
184
        $(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
207
185
        $(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
208
186
        $(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