diff 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
line wrap: on
line diff
--- a/locale/GNUmakefile	Sun Jun 13 01:05:46 2004 +0000
+++ b/locale/GNUmakefile	Sun Jun 13 13:06:54 2004 +0000
@@ -1,7 +1,7 @@
 # Extract translatable strings from Roundup sources,
 # update and compile all existing translations
 #
-# $Id: GNUmakefile,v 1.6 2004-05-29 04:50:46 a1s Exp $
+# $Id: GNUmakefile,v 1.7 2004-06-13 13:06:54 a1s Exp $
 
 # tool locations
 XPOT ?= xpot
@@ -18,11 +18,25 @@
 MO_FILES=$(PO_FILES:.po=.mo)
 RUN_PYTHON=PYTHONPATH=../build/lib $(PYTHON) -O
 
-.PHONY: $(TEMPLATE)
+all: dist
+
+help:
+	@echo "$(MAKE)           - build MO files.  Run this before sdist"
+	@echo "$(MAKE) template  - update message template from sources"
+	@echo "$(MAKE) locale.po - update message file from template"
+	@echo "$(MAKE) locale.mo - compile individual message file"
+	@echo "$(MAKE) help      - this text"\
 
-all: $(TEMPLATE) $(MO_FILES)
+# This will rebuild all MO files without updating their corresponding PO
+# files first.  Run before creating Roundup distribution (hence the name).
+# PO files should be updated by their translators only, automatic update
+# adds unwanted fuzzy labels.
+dist:
+	for file in $(PO_FILES); do \
+	  ${MSGFMT} -o `basename $$file .po`.mo $$file; \
+	done
 
-$(TEMPLATE):
+template:
 	${XPOT} -n -o $@ $(SOURCES)
 	${RUN_PYTHON} ../roundup/cgi/TAL/talgettext.py -u $@ \
 	  ../templates/classic/html/*.html ../templates/minimal/html/*.html

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