comparison locale/GNUmakefile @ 2455:ece6ed48dd3d

by default, build binary message catalogs only... ...don't update message template file or message source files unless explicitely requested; added 'help' target.
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Sun, 13 Jun 2004 13:06:54 +0000
parents 33469189bf86
children fd04f41ab988
comparison
equal deleted inserted replaced
2453:0e2a0c2c8142 2455:ece6ed48dd3d
1 # Extract translatable strings from Roundup sources, 1 # Extract translatable strings from Roundup sources,
2 # update and compile all existing translations 2 # update and compile all existing translations
3 # 3 #
4 # $Id: GNUmakefile,v 1.6 2004-05-29 04:50:46 a1s Exp $ 4 # $Id: GNUmakefile,v 1.7 2004-06-13 13:06:54 a1s Exp $
5 5
6 # tool locations 6 # tool locations
7 XPOT ?= xpot 7 XPOT ?= xpot
8 MSGFMT ?= msgfmt 8 MSGFMT ?= msgfmt
9 MSGMERGE ?= msgmerge 9 MSGMERGE ?= msgmerge
16 SOURCES=$(PACKAGES:=/*.py) 16 SOURCES=$(PACKAGES:=/*.py)
17 PO_FILES=$(wildcard *.po) 17 PO_FILES=$(wildcard *.po)
18 MO_FILES=$(PO_FILES:.po=.mo) 18 MO_FILES=$(PO_FILES:.po=.mo)
19 RUN_PYTHON=PYTHONPATH=../build/lib $(PYTHON) -O 19 RUN_PYTHON=PYTHONPATH=../build/lib $(PYTHON) -O
20 20
21 .PHONY: $(TEMPLATE) 21 all: dist
22 22
23 all: $(TEMPLATE) $(MO_FILES) 23 help:
24 @echo "$(MAKE) - build MO files. Run this before sdist"
25 @echo "$(MAKE) template - update message template from sources"
26 @echo "$(MAKE) locale.po - update message file from template"
27 @echo "$(MAKE) locale.mo - compile individual message file"
28 @echo "$(MAKE) help - this text"\
24 29
25 $(TEMPLATE): 30 # This will rebuild all MO files without updating their corresponding PO
31 # files first. Run before creating Roundup distribution (hence the name).
32 # PO files should be updated by their translators only, automatic update
33 # adds unwanted fuzzy labels.
34 dist:
35 for file in $(PO_FILES); do \
36 ${MSGFMT} -o `basename $$file .po`.mo $$file; \
37 done
38
39 template:
26 ${XPOT} -n -o $@ $(SOURCES) 40 ${XPOT} -n -o $@ $(SOURCES)
27 ${RUN_PYTHON} ../roundup/cgi/TAL/talgettext.py -u $@ \ 41 ${RUN_PYTHON} ../roundup/cgi/TAL/talgettext.py -u $@ \
28 ../templates/classic/html/*.html ../templates/minimal/html/*.html 42 ../templates/classic/html/*.html ../templates/minimal/html/*.html
29 ${XGETTEXT} -j -w 80 -F \ 43 ${XGETTEXT} -j -w 80 -F \
30 --msgid-bugs-address=roundup-devel@lists.sourceforge.net \ 44 --msgid-bugs-address=roundup-devel@lists.sourceforge.net \

Roundup Issue Tracker: http://roundup-tracker.org/