CMUCL commit: intl-branch src/lisp (GNUmakefile)

Raymond Toy rtoy at common-lisp.net
Fri Feb 12 16:01:23 CET 2010


    Date: Friday, February 12, 2010 @ 10:01:23
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/lisp
     Tag: intl-branch

Modified: GNUmakefile

Generalize the rules for updating the po files and generating the mo
files.  We now look for directories in i18n/locale.


-------------+
 GNUmakefile |   24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)


Index: src/lisp/GNUmakefile
diff -u src/lisp/GNUmakefile:1.33.14.1 src/lisp/GNUmakefile:1.33.14.2
--- src/lisp/GNUmakefile:1.33.14.1	Mon Feb  8 21:48:05 2010
+++ src/lisp/GNUmakefile	Fri Feb 12 10:01:23 2010
@@ -1,4 +1,4 @@
-# $Header: /project/cmucl/cvsroot/src/lisp/GNUmakefile,v 1.33.14.1 2010-02-09 02:48:05 rtoy Exp $
+# $Header: /project/cmucl/cvsroot/src/lisp/GNUmakefile,v 1.33.14.2 2010-02-12 15:01:23 rtoy Exp $
 
 all: lisp.nm translations
 
@@ -60,11 +60,23 @@
 
 -include Depends
 
-translations: ../../src/i18n/locale/ko/LC_MESSAGES/cmucl.mo
+# Find all directories in ../i18n/locale.  These are the locales we
+# currently support.
 
-%.mo : %.po
-	-msgfmt -f $^ -o $@
+LOCALES=$(patsubst ../i18n/locale/%, %, $(shell find ../i18n/locale -type d -depth 1))
 
-../../src/i18n/locale/ko/LC_MESSAGES/cmucl.po : cmucl.pot
-	msgmerge $@ $^ -o $@
+# Convert locale names to the appropriate path where we want the mo files to go.
+LOCALE_MO=$(patsubst %, ../i18n/locale/%/LC_MESSAGES/cmucl.mo, $(LOCALES))
+
+translations: $(LOCALE_MO)
+
+.PHONY : translations
+
+# Create the mo files 
+../i18n/locale/%/LC_MESSAGES/cmucl.mo : ../../src/i18n/locale/%/LC_MESSAGES/cmucl.po
+	-msgfmt -v $^ -o $@
+
+# Update the translations with the template
+../../src/i18n/locale/%/LC_MESSAGES/cmucl.po : ../../src/i18n/locale/cmucl.pot
+	msgmerge -v $@ $^ -o $@
 



More information about the cmucl-commit mailing list