~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-06-10 08:15:19 UTC
  • mfrom: (3489.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080610081519-95unlj6ayptlh2uv
(mbp) Bump version to 1.6b3

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
# A relatively simple Makefile to assist in building parts of bzr. Mostly for
18
18
# building documentation, etc.
21
21
### Core Stuff ###
22
22
 
23
23
PYTHON=python
24
 
PYTHON_BUILDFLAGS=
25
24
 
26
 
.PHONY: all clean extensions pyflakes api-docs check-nodocs check
 
25
.PHONY: all clean extensions pyflakes api-docs
27
26
 
28
27
all: extensions
29
28
 
30
29
extensions:
31
30
        @echo "building extension modules."
32
 
        $(PYTHON) setup.py build_ext -i $(PYTHON_BUILDFLAGS)
33
 
 
34
 
check: docs check-nodocs
35
 
 
36
 
check-nodocs: extensions
 
31
        $(PYTHON) setup.py build_ext -i
 
32
 
 
33
check: docs extensions
37
34
        $(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
38
35
        @echo "Running all tests with no locale."
39
36
        LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
111
108
doc/en/user-guide/index.html: $(wildcard $(addsuffix /*.txt, doc/en/user-guide)) 
112
109
        $(rst2html) --stylesheet=../../default.css doc/en/user-guide/index.txt $@
113
110
 
114
 
# Set the paper size for PDF files.
115
 
# Options:  'a4' (ISO A4 size), 'letter' (US Letter size)
116
 
PAPERSIZE = a4
117
 
PDF_DOCS := doc/en/user-guide/user-guide.$(PAPERSIZE).pdf
118
 
 
119
 
# Copy and modify the RST sources, and convert SVG images to PDF
120
 
# files for use a images in the LaTeX-generated PDF.
121
 
# Then generate the PDF output from the modified RST sources.
122
 
doc/en/user-guide/user-guide.$(PAPERSIZE).pdf: $(wildcard $(addsuffix /*.txt, doc/en/user-guide))
123
 
        mkdir -p doc/en/user-guide/latex_prepared
124
 
        $(PYTHON) tools/prepare_for_latex.py \
125
 
            --out-dir=doc/en/user-guide/latex_prepared \
126
 
            --in-dir=doc/en/user-guide
127
 
        cd doc/en/user-guide/latex_prepared && \
128
 
            $(PYTHON) ../../../../tools/rst2pdf.py \
129
 
                --documentoptions=10pt,$(PAPERSIZE)paper \
130
 
                --input-encoding=UTF-8:strict --output-encoding=UTF-8:strict \
131
 
                --strict --title="Bazaar User Guide" \
132
 
                index.txt ../user-guide.$(PAPERSIZE).pdf
133
 
 
134
111
doc/developers/%.html: doc/developers/%.txt
135
112
        $(rst2html) --stylesheet=../default.css $< $@
136
113
 
144
121
                 bzrlib/bundle/commands.py \
145
122
                 bzrlib/conflicts.py \
146
123
                 bzrlib/help_topics/__init__.py \
147
 
                 bzrlib/bzrdir.py \
148
124
                 bzrlib/sign_my_commits.py \
149
125
                 bzrlib/bugtracker.py \
150
126
                 generate_docs.py \
183
159
html-docs: docs
184
160
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
185
161
 
186
 
# Produce PDF documents.  Requires pdfLaTeX, rubber, and Inkscape.
187
 
pdf-docs: $(PDF_DOCS)
188
 
 
189
162
# clean produced docs
190
163
clean-docs:
191
164
        $(PYTHON) tools/win32/ostools.py remove $(ALL_DOCS) \
192
 
            $(HTMLDIR) $(derived_txt_files)
193
 
        rm -f doc/en/user-guide/*.pdf
194
 
        rm -rf doc/en/user-guide/latex_prepared
 
165
        $(HTMLDIR) $(derived_txt_files)
195
166
 
196
167
 
197
168
### Windows Support ###
199
170
# make bzr.exe for win32 with py2exe
200
171
exe:
201
172
        @echo *** Make bzr.exe
202
 
        $(PYTHON) setup.py build_ext -i -f $(PYTHON_BUILDFLAGS)
 
173
        $(PYTHON) setup.py build_ext -i -f
203
174
        $(PYTHON) setup.py py2exe > py2exe.log
204
175
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
205
176
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
207
178
# win32 installer for bzr.exe
208
179
installer: exe copy-docs
209
180
        @echo *** Make windows installer
210
 
        $(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
 
181
        cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
211
182
        iscc /Q tools/win32/bzr.iss
212
183
 
213
184
# win32 Python's distutils-based installer
237
208
 
238
209
.PHONY: dist dist-upload-escudero check-dist-tarball
239
210
 
240
 
# build a distribution tarball and zip file.
 
211
# build a distribution tarball.
241
212
#
242
213
# this method of copying the pyrex generated files is a bit ugly; it would be
243
214
# nicer to generate it from distutils.
 
215
#
 
216
# these are a bit ubuntu-specific.
244
217
dist: 
245
218
        version=`./bzr version --short` && \
246
219
        echo Building distribution of bzr $$version && \
247
220
        expbasedir=`mktemp -t -d tmp_bzr_dist.XXXXXXXXXX` && \
248
221
        expdir=$$expbasedir/bzr-$$version && \
249
222
        tarball=$$PWD/../bzr-$$version.tar.gz && \
250
 
        zipball=$$PWD/../bzr-$$version.zip && \
251
223
        $(MAKE) clean && \
252
224
        $(MAKE) && \
253
225
        bzr export $$expdir && \
254
226
        cp bzrlib/*.c $$expdir/bzrlib/. && \
255
227
        tar cfz $$tarball -C $$expbasedir bzr-$$version && \
256
 
        (cd $$expbasedir && zip -r $$zipball bzr-$$version) && \
257
228
        gpg --detach-sign $$tarball && \
258
 
        gpg --detach-sign $$zipball && \
 
229
        echo $$tarball done. && \
259
230
        rm -rf $$expbasedir
260
231
 
261
232
# run all tests in a previously built tarball
273
244
dist-upload-escudero:
274
245
        version=`./bzr version --short` && \
275
246
        tarball=../bzr-$$version.tar.gz && \
276
 
        zipball=../bzr-$$version.zip && \
277
 
        scp $$zipball $$zipball.sig $$tarball $$tarball.sig \
 
247
        scp $$tarball $$tarball.sig \
278
248
            escudero.ubuntu.com:/srv/bazaar.canonical.com/www/releases/src \
279
249
                && \
280
250
        echo verifying over http... && \
281
 
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.zip \
282
 
                | diff -s - $$zipball && \
283
 
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.zip.sig \
284
 
                | diff -s - $$zipball.sig 
285
251
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz \
286
252
                | diff -s - $$tarball && \
287
253
        curl http://bazaar-vcs.org/releases/src/bzr-$$version.tar.gz.sig \