1*63eb84d1Schristos#!/bin/sh 2*63eb84d1Schristos# Example for use of GNU gettext. 3*63eb84d1Schristos# Copyright (C) 2003-2006 Free Software Foundation, Inc. 4*63eb84d1Schristos# This file is in the public domain. 5*63eb84d1Schristos# 6*63eb84d1Schristos# Script for regenerating all autogenerated files. 7*63eb84d1Schristos 8*63eb84d1Schristosif test -r ../Makefile.am; then 9*63eb84d1Schristos # Inside the gettext source directory. 10*63eb84d1Schristos GETTEXT_TOPSRCDIR=../../.. 11*63eb84d1Schristoselse 12*63eb84d1Schristos if test -r ../Makefile; then 13*63eb84d1Schristos # Inside a gettext build directory. 14*63eb84d1Schristos GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile` 15*63eb84d1Schristos # Adjust a relative top_srcdir. 16*63eb84d1Schristos case $GETTEXT_TOOLS_SRCDIR in 17*63eb84d1Schristos /*) ;; 18*63eb84d1Schristos *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;; 19*63eb84d1Schristos esac 20*63eb84d1Schristos GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/../.. 21*63eb84d1Schristos else 22*63eb84d1Schristos # Installed under ${prefix}/share/doc/gettext/examples. 23*63eb84d1Schristos . ../installpaths 24*63eb84d1Schristos fi 25*63eb84d1Schristosfi 26*63eb84d1Schristos 27*63eb84d1Schristoscp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4 28*63eb84d1Schristoscp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4 29*63eb84d1Schristoscp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/progtest.m4 m4/progtest.m4 30*63eb84d1Schristoscp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin 31*63eb84d1Schristos 32*63eb84d1Schristosaclocal -I m4 33*63eb84d1Schristos 34*63eb84d1Schristosautoconf 35*63eb84d1Schristos 36*63eb84d1Schristosautomake -a -c 37*63eb84d1Schristos 38*63eb84d1Schristoscd po 39*63eb84d1Schristosfor f in *.po; do 40*63eb84d1Schristos if test -r "$f"; then 41*63eb84d1Schristos lang=`echo $f | sed -e 's,\.po$,,'` 42*63eb84d1Schristos msgfmt -c -o $lang.gmo $lang.po 43*63eb84d1Schristos fi 44*63eb84d1Schristosdone 45*63eb84d1Schristoscd .. 46