~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Jelmer Vernooij
  • Date: 2011-12-16 16:40:10 UTC
  • mto: This revision was merged to the branch mainline in revision 6391.
  • Revision ID: jelmer@samba.org-20111216164010-z3hy00xrnclnkf7a
Update 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
 
42
42
        set -e
43
43
        # Generate a stream for PQM to watch.
44
44
        -$(RM) -f selftest.log
45
 
        $(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee 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
46
49
        # An empty log file should catch errors in the $(PYTHON)
47
50
        # command above (the '|' swallow any errors since 'make'
48
51
        # sees the 'tee' exit code for the whole line
66
69
        $(PYTHON) setup.py clean
67
70
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
68
71
 
 
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
 
69
77
# Build API documentation
70
78
docfiles = bzr bzrlib
71
79
api-docs:
72
80
        mkdir -p api/html
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)
 
81
        pydoctor --make-html --docformat='restructuredtext' --html-output=api/html $(docfiles)
76
82
 
77
83
# build tags for emacs and vim
78
84
TAGS:
415
421
        $(PYTHON) tools/win32/ostools.py remove dist
416
422
 
417
423
 
 
424
# i18n targets
 
425
 
 
426
.PHONY: update-pot po/bzr.pot
 
427
update-pot: po/bzr.pot
 
428
 
 
429
TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
 
430
                | grep -v 'bzrlib/tests/' \
 
431
                | grep -v 'bzrlib/doc' \
 
432
                )
 
433
 
 
434
po/bzr.pot: $(PYFILES) $(DOCFILES)
 
435
        $(PYTHON) ./bzr export-pot --include-duplicates > po/bzr.pot
 
436
        echo $(TRANSLATABLE_PYFILES) | xargs \
 
437
          xgettext --package-name "bzr" \
 
438
          --msgid-bugs-address "<bazaar@canonical.com>" \
 
439
          --copyright-holder "Canonical" \
 
440
          --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
 
441
          -d bzr -p po -o bzr.pot
 
442
 
 
443
 
418
444
### Packaging Targets ###
419
445
 
420
446
.PHONY: dist check-dist-tarball