~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Jelmer Vernooij
  • Date: 2011-08-22 10:44:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6094.
  • Revision ID: jelmer@samba.org-20110822104429-74f1o1at79fmno2n
More tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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 extensions pyflakes api-docs check-nodocs check
 
31
.PHONY: all clean realclean extensions pyflakes api-docs check-nodocs check
32
32
 
33
33
all: extensions
34
34
 
39
39
check: docs check-nodocs
40
40
 
41
41
check-nodocs: extensions
 
42
        set -e
42
43
        # Generate a stream for PQM to watch.
43
 
        $(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
 
44
        -$(RM) -f selftest.log
 
45
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest --subunit $(tests) | tee selftest.log
 
46
        # An empty log file should catch errors in the $(PYTHON)
 
47
        # command above (the '|' swallow any errors since 'make'
 
48
        # sees the 'tee' exit code for the whole line
 
49
        if [ ! -s selftest.log ] ; then exit 1 ; fi
44
50
        # Check that there were no errors reported.
45
51
        subunit-stats < selftest.log
46
52
 
60
66
        $(PYTHON) setup.py clean
61
67
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
62
68
 
 
69
realclean: clean
 
70
        # Remove files which are autogenerated but included by the tarball.
 
71
        rm -f bzrlib/*_pyx.c
 
72
        rm -f bzrlib/_simple_set_pyx.h bzrlib/_simple_set_pyx_api.h
 
73
 
63
74
# Build API documentation
64
75
docfiles = bzr bzrlib
65
76
api-docs:
66
77
        mkdir -p api/html
67
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
68
 
check-api-docs:
69
 
        PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
 
78
        pydoctor --make-html --docformat='restructuredtext' --html-output=api/html $(docfiles)
70
79
 
71
80
# build tags for emacs and vim
72
81
TAGS:
133
142
        doc/developers/Makefile \
134
143
        doc/developers/make.bat
135
144
 
 
145
NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
 
146
 
136
147
doc/en/user-reference/index.txt: $(MAN_DEPENDENCIES)
137
148
        $(PYTHON) tools/generate_docs.py -o $@ rstx
138
149
 
139
 
doc/en/release-notes/index.txt: NEWS tools/generate_release_notes.py
140
 
        $(PYTHON) tools/generate_release_notes.py NEWS $@
 
150
doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
151
        $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)
141
152
 
142
153
doc/%/Makefile: doc/en/Makefile
143
154
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
296
307
        $(rst2html) --stylesheet=default.css $< $@
297
308
 
298
309
%.html: %.txt
299
 
        $(rst2html) --stylesheet=../../default.css $< $@
 
310
        $(rst2html) --stylesheet=../../default.css $< "$@"
300
311
 
301
 
doc/en/release-notes/NEWS.txt: NEWS
302
 
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
312
doc/en/release-notes/NEWS.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
313
        $(PYTHON) tools/generate_release_notes.py "$@" $(NEWS_FILES)
303
314
 
304
315
upgrade_guide_dependencies =  $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide)) 
305
316
 
407
418
        $(PYTHON) tools/win32/ostools.py remove dist
408
419
 
409
420
 
 
421
# i18n targets
 
422
 
 
423
.PHONY: update-pot po/bzr.pot
 
424
update-pot: po/bzr.pot
 
425
 
 
426
TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
 
427
                | grep -v 'bzrlib/tests/' \
 
428
                | grep -v 'bzrlib/doc' \
 
429
                )
 
430
 
 
431
po/bzr.pot: $(PYFILES) $(DOCFILES)
 
432
        $(PYTHON) ./bzr export-pot > po/bzr.pot
 
433
        echo $(TRANSLATABLE_PYFILES) | xargs \
 
434
          xgettext --package-name "bzr" \
 
435
          --msgid-bugs-address "<bazaar@canonical.com>" \
 
436
          --copyright-holder "Canonical" \
 
437
          --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
 
438
          -d bzr -p po -o bzr.pot
 
439
 
 
440
 
410
441
### Packaging Targets ###
411
442
 
412
443
.PHONY: dist check-dist-tarball