~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2005-2010 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
28
28
PLUGIN_TARGET=plugin-release
29
29
PYTHON_BUILDFLAGS=
30
30
 
31
 
.PHONY: all clean realclean extensions pyflakes api-docs check-nodocs check
 
31
.PHONY: all clean extensions pyflakes api-docs check-nodocs check
32
32
 
33
33
all: extensions
34
34
 
42
42
        set -e
43
43
        # Generate a stream for PQM to watch.
44
44
        -$(RM) -f selftest.log
45
 
        echo `date` ": selftest starts" 1>&2
46
 
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest -Oselftest.timeout=120 \
47
 
          --subunit $(tests) | tee selftest.log
48
 
        echo `date` ": selftest ends" 1>&2
 
45
        $(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
49
46
        # An empty log file should catch errors in the $(PYTHON)
50
47
        # command above (the '|' swallow any errors since 'make'
51
48
        # sees the 'tee' exit code for the whole line
69
66
        $(PYTHON) setup.py clean
70
67
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
71
68
 
72
 
realclean: clean
73
 
        # Remove files which are autogenerated but included by the tarball.
74
 
        rm -f bzrlib/*_pyx.c
75
 
        rm -f bzrlib/_simple_set_pyx.h bzrlib/_simple_set_pyx_api.h
76
 
 
77
69
# Build API documentation
78
70
docfiles = bzr bzrlib
79
71
api-docs:
80
72
        mkdir -p api/html
81
 
        pydoctor --make-html --docformat='restructuredtext' --html-output=api/html $(docfiles)
 
73
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
 
74
check-api-docs:
 
75
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
82
76
 
83
77
# build tags for emacs and vim
84
78
TAGS:
148
142
NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
149
143
 
150
144
doc/en/user-reference/index.txt: $(MAN_DEPENDENCIES)
151
 
        LANGUAGE=C $(PYTHON) tools/generate_docs.py -o $@ rstx
 
145
        $(PYTHON) tools/generate_docs.py -o $@ rstx
152
146
 
153
147
doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py
154
148
        $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)
192
186
        cd doc/developers && make htmlhelp
193
187
 
194
188
 
195
 
# Build the texinfo files using Sphinx.
196
 
texinfo-sphinx: $(SPHINX_DEPENDENCIES)
197
 
        cd doc/en && make texinfo
198
 
        cd doc/es && make texinfo
199
 
        cd doc/ru && make texinfo
200
 
        cd doc/ja && make texinfo
201
 
        cd doc/developers && make texinfo
202
 
 
203
189
### Documentation Website ###
204
190
 
205
191
# Where to build the website
318
304
        $(rst2html) --stylesheet=default.css $< $@
319
305
 
320
306
%.html: %.txt
321
 
        $(rst2html) --stylesheet=../../default.css $< "$@"
 
307
        $(rst2html) --stylesheet=../../default.css $< $@
322
308
 
323
 
doc/en/release-notes/NEWS.txt: $(NEWS_FILES) tools/generate_release_notes.py
324
 
        $(PYTHON) tools/generate_release_notes.py "$@" $(NEWS_FILES)
 
309
doc/en/release-notes/NEWS.txt: NEWS
 
310
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
325
311
 
326
312
upgrade_guide_dependencies =  $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide)) 
327
313
 
429
415
        $(PYTHON) tools/win32/ostools.py remove dist
430
416
 
431
417
 
432
 
# i18n targets
433
 
 
434
 
.PHONY: update-pot po/bzr.pot
435
 
update-pot: po/bzr.pot
436
 
 
437
 
TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
438
 
                | grep -v 'bzrlib/tests/' \
439
 
                | grep -v 'bzrlib/doc' \
440
 
                )
441
 
 
442
 
po/bzr.pot: $(PYFILES) $(DOCFILES)
443
 
        $(PYTHON) ./bzr export-pot --include-duplicates > po/bzr.pot
444
 
        echo $(TRANSLATABLE_PYFILES) | xargs \
445
 
          xgettext --package-name "bzr" \
446
 
          --msgid-bugs-address "<bazaar@canonical.com>" \
447
 
          --copyright-holder "Canonical" \
448
 
          --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
449
 
          -d bzr -p po -o bzr.pot
450
 
 
451
 
 
452
418
### Packaging Targets ###
453
419
 
454
420
.PHONY: dist check-dist-tarball