Update Spanish translation
[gnumeric.git] / autogen.sh
blobabb553371b429e4b8a0c578f2644334030abe6fd
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 PKG_NAME="Gnumeric"
6 test -n "$srcdir" || srcdir=$(dirname "$0")
7 test -n "$srcdir" || srcdir=.
9 olddir=$(pwd)
11 (test -f $srcdir/configure.ac \
12 && test -d $srcdir/src \
13 && test -f $srcdir/src/gnumeric.h) || {
14 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
15 echo " top-level gnumeric directory"
16 exit 1
19 cd $srcdir
20 aclocal --install || exit 1
21 glib-gettextize --force --copy || exit 1
22 gtkdocize --copy || exit 1
23 intltoolize --force --copy --automake || exit 1
24 autoreconf --verbose --force --install || exit 1
25 cd $olddir
28 # We have our own copy of Makefile.in.in generated October 2008.
29 # One of the reasons why we need a local copy is that
30 # we generate po-functions/Makefile.in.in from it, which is committed to
31 # SVN, so this file cannot depend on the versions of the tools which the
32 # developers have installed.
34 echo "Creating po/Makefile.in.in and po-functions/Makefile.in.in."
35 rm -f $srcdir/po/Makefile.in.in $srcdir/po-functions/Makefile.in.in
36 cp $srcdir/po/Makefile.in.in.own $srcdir/po/Makefile.in.in
37 sed '/^\(GETTEXT_PACKAGE\|subdir\) =/s/[ ]*$/-functions/
38 s|$(srcdir)/LINGUAS|$(top_srcdir)/po/LINGUAS|g
39 /^GETTEXT_PACKAGE =/a\
40 XGETTEXT_KEYWORDS = --keyword --keyword=F_
41 /^EXTRA_DISTFILES/s/ LINGUAS//
42 ' $srcdir/po/Makefile.in.in >$srcdir/po-functions/Makefile.in.in
44 echo "Creating po-functions/POTFILES.{in,skip}."
45 rm -f $srcdir/po-functions/POTFILES.in $srcdir/po-functions/POTFILES.skip
46 # This regex matches names of XML files:
47 xml_file_name='^((schemas|templates)/.+|[^/]+)\.in$|\.(glade|xml)(\.in)?$'
48 ( echo "# Generated by autogen.sh; do not edit."
49 egrep -v "^#|$xml_file_name" $srcdir/po/POTFILES.in
50 ) >$srcdir/po-functions/POTFILES.in
51 ( echo "# Generated by autogen.sh; do not edit."
52 test -f $srcdir/po/POTFILES.skip && grep -v '^#' $srcdir/po/POTFILES.skip
53 egrep "$xml_file_name" $srcdir/po/POTFILES.in
54 ) >$srcdir/po-functions/POTFILES.skip
57 if [ "$NOCONFIGURE" = "" ]; then
58 $srcdir/configure "$@" || exit 1
60 if [ "$1" = "--help" ]; then exit 0 else
61 echo "Now type 'make' to compile $PKG_NAME" || exit 1
63 else
64 echo "Skipping configure process."