'export' is not needed here.
[monky] / autogen.sh
1 #!/bin/sh
2 # $Id$
3
4 # autogen.sh
5 #
6 # optional $1 = optional directory containing build tree or svn working copy
7
8 AUTOCONF=${AUTOCONF:-autoconf}
9 AUTOMAKE=${AUTOMAKE:-automake}
10 ACLOCAL=${ACLOCAL:-aclocal}
11 AUTOHEADER=${AUTOHEADER:-autoheader}
12 LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
13
14 # identify svn revision, if an svn working copy
15 if test "$1" != "" && test -d "$1/.svn"; then
16     revision=`LC_ALL=C svn info $1 | awk '/^Revision: / {printf "%05d\n", $2}'`;
17 elif test -d ".svn"; then
18     revision=`LC_ALL=C svn info | awk '/^Revision: / {printf "%05d\n", $2}'`; 
19 else
20     revision="NONE"; fi
21
22 # generate configure.ac with substituted svn revision
23 sed -e "s/@REVISION@/${revision}/g" < "configure.ac.in" > "configure.ac"
24
25 echo Running $ACLOCAL -I m4 ... && $ACLOCAL -I m4
26 echo Running $LIBTOOLIZE --force --copy ... && $LIBTOOLIZE --force --copy
27 echo Running $AUTOHEADER ... && $AUTOHEADER
28 echo Running $AUTOMAKE --add-missing --copy --gnu ... && $AUTOMAKE --add-missing --copy --gnu
29 echo Running $AUTOCONF ... && $AUTOCONF