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