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