Commit 9073131c authored by rtoy's avatar rtoy
Browse files

tools/build.sh:

o Add -U option.  This causes the updated translations to overwrite
  the *.po files in source tree.  Without -U, the diff of the changes
  are printed, as before.  The -U option is useful to prepare the po
  files for checking in to the CVS repository.

lisp/GNUmakefile:
o Put back the original translations target and rule, but rename the
  target to tranlations-update.  This allows developers to overwrite
  the translations in the source tree, ready for analysis or checkin,
  as appropriate.
parent b22644d4
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.38 2010/09/16 02:29:37 rtoy Rel $ # $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.39 2010/10/14 17:47:12 rtoy Exp $
all: lisp.nm all: lisp.nm
...@@ -103,3 +103,19 @@ translations: ...@@ -103,3 +103,19 @@ translations:
.PHONY : translations .PHONY : translations
# Like translations, but we don't compute the diff. We just overwrite
# the po files in the repository so that we can tell if the
# translations have changed and need to be updated. (This is what the
# old translations used to do.)
translations-update:
for pot in ../../src/i18n/locale/*.pot; do \
for po in $(LOCALE_DIRS); do \
d=`dirname $$pot`; \
f=`basename $$pot .pot`; \
touch ../../src/$$po/$$f.po; \
echo ; \
echo '***' Processing $$f.pot: $$po; \
msgmerge -v ../../src/$$po/$$f.po $$pot -o ../../src/$$po/$$f.po; \
msgfmt -v ../../src/$$po/$$f.po -o ../$$po/$$f.mo; \
done; done
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
# #
# For more information see src/BUILDING. # For more information see src/BUILDING.
# #
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/build.sh,v 1.35 2010/09/25 18:03:15 rtoy Rel $ # $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/build.sh,v 1.36 2010/10/14 17:47:12 rtoy Exp $
# #
ENABLE2="yes" ENABLE2="yes"
...@@ -66,7 +66,7 @@ fi ...@@ -66,7 +66,7 @@ fi
usage () usage ()
{ {
echo "build.sh [-123obvuBC?]" echo "build.sh [-123obvuBCU?]"
echo " -1 Skip build 1" echo " -1 Skip build 1"
echo " -2 Skip build 2" echo " -2 Skip build 2"
echo " -3 Skip build 3" echo " -3 Skip build 3"
...@@ -90,6 +90,8 @@ usage () ...@@ -90,6 +90,8 @@ usage ()
echo ' the translations.' echo ' the translations.'
echo " -? This help message" echo " -? This help message"
echo " -w Specify a different build-world.sh script" echo " -w Specify a different build-world.sh script"
echo " -U If translations are done, overwrite the CVS files with the"
echo " translations instead of computing and displayin the diffs."
exit 1 exit 1
} }
...@@ -139,8 +141,9 @@ buildit () ...@@ -139,8 +141,9 @@ buildit ()
FPU_MODE= FPU_MODE=
BUILDWORLD="$TOOLDIR/build-world.sh" BUILDWORLD="$TOOLDIR/build-world.sh"
BUILD_POT="yes" BUILD_POT="yes"
UPDATE_TRANS=
while getopts "123Po:b:v:uB:C:i:f:w:?" arg while getopts "123Po:b:v:uB:C:Ui:f:w:?" arg
do do
case $arg in case $arg in
1) ENABLE2="no" ;; 1) ENABLE2="no" ;;
...@@ -157,6 +160,7 @@ do ...@@ -157,6 +160,7 @@ do
f) FPU_MODE="-fpu $OPTARG" ;; f) FPU_MODE="-fpu $OPTARG" ;;
P) BUILD_POT=no ;; P) BUILD_POT=no ;;
w) BUILDWORLD="$OPTARG" ;; w) BUILDWORLD="$OPTARG" ;;
U) UPDATE_TRANS="yes";;
\?) usage \?) usage
;; ;;
esac esac
...@@ -200,7 +204,11 @@ ENABLE=$ENABLE4 ...@@ -200,7 +204,11 @@ ENABLE=$ENABLE4
if [ "${BUILD_POT}" = "yes" ]; then if [ "${BUILD_POT}" = "yes" ]; then
MAKE_POT=yes MAKE_POT=yes
MAKE_TARGET="all translations" if [ "${UPDATE_TRANS}" = "yes" ]; then
MAKE_TARGET="all translations-update"
else
MAKE_TARGET="all translations"
fi
export MAKE_POT export MAKE_POT
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment