Skip to content

Commit 7743ca7

Browse files
committed
Updates, python3, hg diff, add target doc, add pytest target
1 parent 348dff0 commit 7743ca7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

locale/GNUmakefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ XPOT ?= xpot
66
MSGFMT ?= msgfmt
77
MSGMERGE ?= msgmerge
88
XGETTEXT ?= xgettext
9-
PYTHON ?= python
9+
PYTHON ?= python3
1010

1111
TEMPLATE=roundup.pot
1212

@@ -22,7 +22,10 @@ all: dist
2222

2323
help:
2424
@echo "$(MAKE) - build MO files. Run this before sdist"
25+
@echo "$(MAKE) dist - same as above
2526
@echo "$(MAKE) template - update message template from sources"
27+
@echo "$(MAKE) diff - see template differences in vi"
28+
@echo "$(MAKE) pytest - create locale files to run pytest
2629
@echo "$(MAKE) locale.po - update message file from template"
2730
@echo "$(MAKE) locale.mo - compile individual message file"
2831
@echo "$(MAKE) help - this text"\
@@ -37,7 +40,7 @@ dist:
3740
done
3841

3942
template:
40-
test -d $(PYTHON_BUILD) || (echo "Missing build directory. ln -s lib to build library"; exit 1)
43+
test -d $(PYTHON_BUILD) || (echo "Missing build directory $(PYTHON_BUILD). ln -s lib to build library"; exit 1)
4144
${XPOT} -n -o $(TEMPLATE) $(SOURCES)
4245

4346
${RUN_PYTHON} ../roundup/cgi/TAL/talgettext.py -u $(TEMPLATE) \
@@ -50,7 +53,7 @@ template:
5053
--copyright-holder="See Roundup README.txt" \
5154
-o $(TEMPLATE) $(SOURCES)
5255

53-
local_install: dist
56+
pytest local_install: dist
5457
for file in $(MO_FILES); do \
5558
lang=`basename $$file .mo`; \
5659
mkdir -p locale/$$lang/LC_MESSAGES; \
@@ -59,7 +62,7 @@ local_install: dist
5962

6063
# helps to check template file before check in
6164
diff:
62-
svn diff roundup.pot|grep -v '^[-+]#'|vim -Rv -
65+
hg diff roundup.pot|grep -v '^[-+]#'| vi -Rv -
6366

6467
%.po: $(TEMPLATE)
6568
${MSGMERGE} -U --suffix=.bak $@ $<

0 commit comments

Comments
 (0)