have config.status create the translations dir instead of configure itself;

create it in $srcdir, since an out-of-tree builddir is not a suitable
datadir; do not attempt to do so when $srcdir is not writable
(eg. source tree on a read-only network filesystem); robustified the
symlink creation
This commit is contained in:
Yann Dirson 2005-04-05 15:22:56 +00:00
parent b90c25b2f8
commit e82f844091
2 changed files with 12 additions and 7 deletions

View file

@ -119,6 +119,7 @@ CVS HEAD:
* improved threading of campaign server
* fixed the dialog menus being larger than the screen
* made the game remember the last server used for downloading campaings
* when building out of the source tree, configure now creates the translations/ directory in the source tree, but does not attempt to do so if it is read-only
* code refactoring and dependency cleanups
* various bug fixes and code cleanups

View file

@ -730,7 +730,8 @@ fi
# Tune gettext stuff for our needs #
#######################################################################
rm -rf translations
AC_CONFIG_COMMANDS([translations],
[rm -rf translations
case $srcdir in
/*) topdir=$srcdir ;;
*) topdir=`pwd`/$srcdir ;;
@ -744,12 +745,15 @@ do
ln -s $topdir/po/Makefile.in.in po/$domain/Makefile.in.in
# Symlinks that allow message catalogs to be used from build tree
for lang in `cat $srcdir/po/$domain/LINGUAS`
do
mkdir -p translations/$lang/LC_MESSAGES
ln -s $topdir/po/$domain/$lang.gmo translations/$lang/LC_MESSAGES/$domain.mo
done
done
if test -w $srcdir; then
for lang in `cat $srcdir/po/$domain/LINGUAS`
do
mkdir -p $srcdir/translations/$lang/LC_MESSAGES
rm -f $srcdir/translations/$lang/LC_MESSAGES/$domain.mo
ln -s $topdir/po/$domain/$lang.gmo $srcdir/translations/$lang/LC_MESSAGES/$domain.mo
done
fi
done])
#######################################################################
# Data file substitution. #