/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
# A relatively simple Makefile to assist in building parts of bzr. Mostly for
 
17
# A relatively simple Makefile to assist in building parts of brz. Mostly for
18
18
# building documentation, etc.
19
19
 
20
20
 
24
24
PYTHON24=python24
25
25
PYTHON25=python25
26
26
PYTHON26=python26
27
 
BZR_TARGET=release
 
27
BRZ_TARGET=release
28
28
PLUGIN_TARGET=plugin-release
29
29
PYTHON_BUILDFLAGS=
30
30
 
43
43
        # Generate a stream for PQM to watch.
44
44
        -$(RM) -f selftest.log
45
45
        echo `date` ": selftest starts" 1>&2
46
 
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest -Oselftest.timeout=120 \
 
46
        $(PYTHON) -Werror -Wignore::ImportWarning -O ./brz selftest -Oselftest.timeout=120 \
47
47
          --subunit $(tests) | tee selftest.log
48
48
        echo `date` ": selftest ends" 1>&2
49
49
        # An empty log file should catch errors in the $(PYTHON)
58
58
# Note that at present this gives many false warnings, because it doesn't
59
59
# know about identifiers loaded through lazy_import.
60
60
pyflakes:
61
 
        pyflakes bzrlib
 
61
        pyflakes breezy
62
62
 
63
63
pyflakes-nounused:
64
64
        # There are many of these warnings at the moment and they're not a
65
65
        # high priority to fix
66
 
        pyflakes bzrlib | grep -v ' imported but unused'
 
66
        pyflakes breezy | grep -v ' imported but unused'
67
67
 
68
68
clean:
69
69
        $(PYTHON) setup.py clean
71
71
 
72
72
realclean: clean
73
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
 
74
        rm -f breezy/*_pyx.c
 
75
        rm -f breezy/_simple_set_pyx.h breezy/_simple_set_pyx_api.h
76
76
 
77
77
# Build API documentation
78
 
docfiles = bzr bzrlib
 
78
docfiles = brz breezy
79
79
api-docs:
80
80
        mkdir -p api/html
81
81
        pydoctor --make-html --docformat='restructuredtext' --html-output=api/html $(docfiles)
82
82
 
83
83
# build tags for emacs and vim
84
84
TAGS:
85
 
        ctags -R -e bzrlib
 
85
        ctags -R -e breezy
86
86
 
87
87
tags:
88
 
        ctags -R bzrlib
 
88
        ctags -R breezy
89
89
 
90
90
# these are treated as phony so they'll always be rebuilt - it's pretty quick
91
91
.PHONY: TAGS tags
105
105
 
106
106
### Man-page Documentation ###
107
107
 
108
 
MAN_DEPENDENCIES = bzrlib/builtins.py \
109
 
        $(wildcard bzrlib/*.py) \
110
 
        $(wildcard bzrlib/*/*.py) \
 
108
MAN_DEPENDENCIES = breezy/builtins.py \
 
109
        $(wildcard breezy/*.py) \
 
110
        $(wildcard breezy/*/*.py) \
111
111
        tools/generate_docs.py \
112
 
        $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en)) 
 
112
        $(wildcard $(addsuffix /*.txt, breezy/help_topics/en)) 
113
113
 
114
 
MAN_PAGES = man1/bzr.1
115
 
man1/bzr.1: $(MAN_DEPENDENCIES)
 
114
MAN_PAGES = man1/brz.1
 
115
man1/brz.1: $(MAN_DEPENDENCIES)
116
116
        $(PYTHON) tools/generate_docs.py -o $@ man
117
117
 
118
118
 
145
145
        doc/developers/Makefile \
146
146
        doc/developers/make.bat
147
147
 
148
 
NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
 
148
NEWS_FILES = $(wildcard doc/en/release-notes/brz-*.txt)
149
149
 
150
150
doc/en/user-reference/index.txt: $(MAN_DEPENDENCIES)
151
151
        LANGUAGE=C $(PYTHON) tools/generate_docs.py -o $@ rstx
253
253
 
254
254
non_txt_files = \
255
255
       doc/default.css \
256
 
       $(wildcard doc/*/bzr-en-quick-reference.svg) \
257
 
       $(wildcard doc/*/bzr-en-quick-reference.png) \
258
 
       $(wildcard doc/*/bzr-en-quick-reference.pdf) \
 
256
       $(wildcard doc/*/brz-en-quick-reference.svg) \
 
257
       $(wildcard doc/*/brz-en-quick-reference.png) \
 
258
       $(wildcard doc/*/brz-en-quick-reference.pdf) \
259
259
       $(wildcard doc/*/bzr-es-quick-reference.svg) \
260
260
       $(wildcard doc/*/bzr-es-quick-reference.png) \
261
261
       $(wildcard doc/*/bzr-es-quick-reference.pdf) \
372
372
        $(PYTHON) tools/win32/ostools.py makedir build-win32
373
373
        @# cd to tools/win32 so that the relative paths are copied correctly
374
374
        cd tools/win32 && $(PYTHON) ostools.py copytree $(BUILDOUT_FILES) ../../build-win32
375
 
        @# There seems to be a bug in gf.release.bzr, It doesn't correctly update
 
375
        @# There seems to be a bug in gf.release.brz, It doesn't correctly update
376
376
        @# existing release directories, so delete them manually before building
377
377
        @# It means things may be rebuilt that don't need to be, but at least
378
378
        @# it will be correct when they do.
379
379
        cd build-win32 && $(PYTHON) ostools.py remove release */release
380
380
        cd build-win32 && $(PYTHON) bootstrap.py
381
381
        cd build-win32 && bin/buildout
382
 
        cd build-win32 && bin/build-installer.bat $(BZR_TARGET) $(PLUGIN_TARGET)
 
382
        cd build-win32 && bin/build-installer.bat $(BRZ_TARGET) $(PLUGIN_TARGET)
383
383
 
384
384
 
385
385
clean-installer-all:
386
386
        $(PYTHON) tools/win32/ostools.py remove build-win32
387
387
 
388
 
# make bzr.exe for win32 with py2exe
 
388
# make brz.exe for win32 with py2exe
389
389
exe:
390
 
        @echo *** Make bzr.exe
391
 
        $(PYTHON) tools/win32/ostools.py remove bzrlib/*.pyd
 
390
        @echo *** Make brz.exe
 
391
        $(PYTHON) tools/win32/ostools.py remove breezy/*.pyd
392
392
        $(PYTHON) setup.py build_ext -i -f $(PYTHON_BUILDFLAGS)
393
393
        $(PYTHON) setup.py py2exe > py2exe.log
394
 
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
395
 
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
 
394
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_brz.bat win32_brz.exe
 
395
        $(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_brz.exe
396
396
 
397
 
# win32 installer for bzr.exe
 
397
# win32 installer for brz.exe
398
398
installer: exe copy-docs
399
399
        @echo *** Make Windows installer
400
 
        $(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
401
 
        iscc /Q tools/win32/bzr.iss
 
400
        $(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/brz.iss tools/win32/brz.iss.cog
 
401
        iscc /Q tools/win32/brz.iss
402
402
 
403
403
# win32 Python's distutils-based installer
404
404
# require to have Python interpreter installed on win32
405
405
py-inst-24: docs
406
 
        $(PYTHON24) setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 
406
        $(PYTHON24) setup.py bdist_wininst --install-script="brz-win32-bdist-postinstall.py" -d .
407
407
 
408
408
py-inst-25: docs
409
 
        $(PYTHON25) setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 
409
        $(PYTHON25) setup.py bdist_wininst --install-script="brz-win32-bdist-postinstall.py" -d .
410
410
 
411
411
py-inst-26: docs
412
 
        $(PYTHON26) setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 
412
        $(PYTHON26) setup.py bdist_wininst --install-script="brz-win32-bdist-postinstall.py" -d .
413
413
 
414
414
python-installer: py-inst-24 py-inst-25 py-inst-26
415
415
 
416
416
 
417
417
copy-docs: docs
418
 
        $(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc
419
 
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
 
418
        $(PYTHON) tools/win32/ostools.py copytodir README win32_brz.exe/doc
 
419
        $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_brz.exe
420
420
 
421
421
# clean on win32 all installer-related files and directories
422
422
clean-win32: clean-docs
423
423
        $(PYTHON) tools/win32/ostools.py remove build
424
 
        $(PYTHON) tools/win32/ostools.py remove win32_bzr.exe
 
424
        $(PYTHON) tools/win32/ostools.py remove win32_brz.exe
425
425
        $(PYTHON) tools/win32/ostools.py remove py2exe.log
426
 
        $(PYTHON) tools/win32/ostools.py remove tools/win32/bzr.iss
427
 
        $(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
428
 
        $(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
 
426
        $(PYTHON) tools/win32/ostools.py remove tools/win32/brz.iss
 
427
        $(PYTHON) tools/win32/ostools.py remove brz-setup*.exe
 
428
        $(PYTHON) tools/win32/ostools.py remove brz-*win32.exe
429
429
        $(PYTHON) tools/win32/ostools.py remove dist
430
430
 
431
431
 
432
432
# i18n targets
433
433
 
434
 
.PHONY: update-pot po/bzr.pot
435
 
update-pot: po/bzr.pot
 
434
.PHONY: update-pot po/brz.pot
 
435
update-pot: po/brz.pot
436
436
 
437
 
TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
438
 
                | grep -v 'bzrlib/tests/' \
439
 
                | grep -v 'bzrlib/doc' \
 
437
TRANSLATABLE_PYFILES:=$(shell find breezy -name '*.py' \
 
438
                | grep -v 'breezy/tests/' \
 
439
                | grep -v 'breezy/doc' \
440
440
                )
441
441
 
442
 
po/bzr.pot: $(PYFILES) $(DOCFILES)
443
 
        $(PYTHON) ./bzr export-pot --include-duplicates > po/bzr.pot
 
442
po/brz.pot: $(PYFILES) $(DOCFILES)
 
443
        $(PYTHON) ./brz export-pot --include-duplicates > po/brz.pot
444
444
        echo $(TRANSLATABLE_PYFILES) | xargs \
445
 
          xgettext --package-name "bzr" \
 
445
          xgettext --package-name "brz" \
446
446
          --msgid-bugs-address "<bazaar@canonical.com>" \
447
447
          --copyright-holder "Canonical" \
448
448
          --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
449
 
          -d bzr -p po -o bzr.pot
 
449
          -d bzr -p po -o brz.pot
450
450
 
451
451
 
452
452
### Packaging Targets ###
455
455
 
456
456
# build a distribution source tarball
457
457
dist: 
458
 
        version=`./bzr version --short` && \
459
 
        echo Building distribution of bzr $$version && \
460
 
        expbasedir=`mktemp -t -d tmp_bzr_dist.XXXXXXXXXX` && \
461
 
        expdir=$$expbasedir/bzr-$$version && \
462
 
        tarball=$$PWD/../bzr-$$version.tar.gz && \
 
458
        version=`./brz version --short` && \
 
459
        echo Building distribution of brz $$version && \
 
460
        expbasedir=`mktemp -t -d tmp_brz_dist.XXXXXXXXXX` && \
 
461
        expdir=$$expbasedir/brz-$$version && \
 
462
        tarball=$$PWD/../brz-$$version.tar.gz && \
463
463
        $(MAKE) clean && \
464
464
        $(MAKE) && \
465
465
        $(PYTHON) setup.py sdist -d $$PWD/.. && \
468
468
 
469
469
# run all tests in a previously built tarball
470
470
check-dist-tarball:
471
 
        tmpdir=`mktemp -t -d tmp_bzr_check_dist.XXXXXXXXXX` && \
472
 
        version=`./bzr version --short` && \
473
 
        tarball=$$PWD/../bzr-$$version.tar.gz && \
 
471
        tmpdir=`mktemp -t -d tmp_brz_check_dist.XXXXXXXXXX` && \
 
472
        version=`./brz version --short` && \
 
473
        tarball=$$PWD/../brz-$$version.tar.gz && \
474
474
        tar Cxz $$tmpdir -f $$tarball && \
475
 
        $(MAKE) -C $$tmpdir/bzr-$$version check && \
 
475
        $(MAKE) -C $$tmpdir/brz-$$version check && \
476
476
        rm -rf $$tmpdir