~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

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
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest --subunit $(tests) | tee selftest.log
46
46
        # An empty log file should catch errors in the $(PYTHON)
47
47
        # command above (the '|' swallow any errors since 'make'
48
48
        # sees the 'tee' exit code for the whole line
66
66
        $(PYTHON) setup.py clean
67
67
        -find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
68
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
 
69
74
# Build API documentation
70
75
docfiles = bzr bzrlib
71
76
api-docs:
139
144
        doc/developers/Makefile \
140
145
        doc/developers/make.bat
141
146
 
 
147
NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
 
148
 
142
149
doc/en/user-reference/index.txt: $(MAN_DEPENDENCIES)
143
150
        $(PYTHON) tools/generate_docs.py -o $@ rstx
144
151
 
145
 
doc/en/release-notes/index.txt: NEWS tools/generate_release_notes.py
146
 
        $(PYTHON) tools/generate_release_notes.py NEWS $@
 
152
doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
153
        $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)
147
154
 
148
155
doc/%/Makefile: doc/en/Makefile
149
156
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
302
309
        $(rst2html) --stylesheet=default.css $< $@
303
310
 
304
311
%.html: %.txt
305
 
        $(rst2html) --stylesheet=../../default.css $< $@
 
312
        $(rst2html) --stylesheet=../../default.css $< "$@"
306
313
 
307
 
doc/en/release-notes/NEWS.txt: NEWS
308
 
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
314
doc/en/release-notes/NEWS.txt: $(NEWS_FILES) tools/generate_release_notes.py
 
315
        $(PYTHON) tools/generate_release_notes.py "$@" $(NEWS_FILES)
309
316
 
310
317
upgrade_guide_dependencies =  $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide)) 
311
318