106
106
### Man-page Documentation ###
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))
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
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)
385
385
clean-installer-all:
386
386
$(PYTHON) tools/win32/ostools.py remove build-win32
388
# make bzr.exe for win32 with py2exe
388
# make brz.exe for win32 with py2exe
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
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
403
403
# win32 Python's distutils-based installer
404
404
# require to have Python interpreter installed on win32
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 .
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 .
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 .
414
414
python-installer: py-inst-24 py-inst-25 py-inst-26
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
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
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
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' \
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
452
452
### Packaging Targets ###