CMUCL commit: intl-2-branch src (3 files)

Raymond Toy rtoy at common-lisp.net
Thu Feb 25 23:01:11 CET 2010


    Date: Thursday, February 25, 2010 @ 17:01:11
  Author: rtoy
    Path: /project/cmucl/cvsroot/src
     Tag: intl-2-branch

Modified: lisp/GNUmakefile tools/build.sh tools/make-extra-dist.sh

Merge build support from intl-branch to support piglatin.


--------------------------+
 lisp/GNUmakefile         |   27 +++++++++++++++++++++------
 tools/build.sh           |    5 +++--
 tools/make-extra-dist.sh |   11 ++++++++++-
 3 files changed, 34 insertions(+), 9 deletions(-)


Index: src/lisp/GNUmakefile
diff -u src/lisp/GNUmakefile:1.33.16.1 src/lisp/GNUmakefile:1.33.16.2
--- src/lisp/GNUmakefile:1.33.16.1	Thu Feb 25 15:34:55 2010
+++ src/lisp/GNUmakefile	Thu Feb 25 17:01:11 2010
@@ -1,4 +1,4 @@
-# $Header: /project/cmucl/cvsroot/src/lisp/GNUmakefile,v 1.33.16.1 2010-02-25 20:34:55 rtoy Exp $
+# $Header: /project/cmucl/cvsroot/src/lisp/GNUmakefile,v 1.33.16.2 2010-02-25 22:01:11 rtoy Exp $
 
 all: lisp.nm translations
 
@@ -60,11 +60,26 @@
 
 -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 $@
+# This would be a nice way to do it so we don't have to keep track of
+# the directories, but Solaris' find doesn't grok -depth 1
+#LOCALES=$(patsubst ../i18n/locale/%, %, $(shell find ../i18n/locale -type d -depth 1))
+LOCALES=en at piglatin ko
 
-../../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 $@
 
Index: src/tools/build.sh
diff -u src/tools/build.sh:1.28.4.1 src/tools/build.sh:1.28.4.2
--- src/tools/build.sh:1.28.4.1	Thu Feb 25 15:34:57 2010
+++ src/tools/build.sh	Thu Feb 25 17:01:11 2010
@@ -32,7 +32,7 @@
 #
 # For more information see src/BUILDING.
 #
-# $Header: /project/cmucl/cvsroot/src/tools/build.sh,v 1.28.4.1 2010-02-25 20:34:57 rtoy Exp $
+# $Header: /project/cmucl/cvsroot/src/tools/build.sh,v 1.28.4.2 2010-02-25 22:01:11 rtoy Exp $
 #
 
 ENABLE2="yes"
@@ -86,6 +86,7 @@
     echo '               you would give to create-target.sh for the lisp'
     echo '               and motif variant.'
     echo '    -f mode   FPU mode:  x87, sse2, or auto.  Default is auto'
+    echo '    -P        On the last build, generate cmucl.pot'
     echo "    -?        This help message"
 
     exit 1
@@ -186,7 +187,7 @@
 OLDLISP="${BASE}-3/lisp/lisp -noinit $FPU_MODE"
 ENABLE=$ENABLE4
 
-if [ ${BUILD_POT} = "yes" ]; then
+if [ "${BUILD_POT}" = "yes" ]; then
    MAKE_POT=yes
    export MAKE_POT
 fi
Index: src/tools/make-extra-dist.sh
diff -u src/tools/make-extra-dist.sh:1.9.12.1 src/tools/make-extra-dist.sh:1.9.12.2
--- src/tools/make-extra-dist.sh:1.9.12.1	Thu Feb 25 15:34:57 2010
+++ src/tools/make-extra-dist.sh	Thu Feb 25 17:01:11 2010
@@ -107,12 +107,21 @@
 done
 
 # Install all the locale data.
-#set -x
+
 for d in `(cd src/i18n/; find locale -type d -print | grep -v CVS)`
 do
     install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/$d
 done
 
+# Install mo files.
+for f in `(cd $TARGET/i18n; find locale -type f -print | grep -v 'CVS\|~.*~\|.*~')`
+do
+    FILE=`basename $f`
+    DIR=`dirname $f`
+    install ${GROUP} ${OWNER} -m 0644 $TARGET/i18n/$f $DESTDIR/lib/cmucl/lib/$DIR
+done
+
+# Install po files
 for f in `(cd src/i18n; find locale -type f -print | grep -v 'CVS\|~.*~\|.*~')`
 do
     FILE=`basename $f`



More information about the cmucl-commit mailing list