Commit bd89ad25f3a23cf9f2d8f259e02487c4178c339b
1 parent
ae4b6698
Exists in
master
and in
5 other branches
autogen passa a rodar o ./configure automaticamente
Showing
1 changed file
with
13 additions
and
12 deletions
Show diff stats
autogen.sh
1 | 1 | #!/bin/bash |
2 | 2 | |
3 | -if test -z $1; then | |
4 | - out=`dirname $0` | |
5 | -else | |
6 | - out="$1" | |
7 | -fi | |
3 | +test -n "$srcdir" || srcdir=`dirname "$0"` | |
4 | +test -n "$srcdir" || srcdir=. | |
5 | + | |
6 | +olddir=`pwd` | |
7 | +cd "$srcdir" | |
8 | 8 | |
9 | 9 | if test -e revision ; then |
10 | 10 | . revision |
... | ... | @@ -15,8 +15,7 @@ SVN=`which svn 2> /dev/null` |
15 | 15 | if test -x "$SVN" ; then |
16 | 16 | |
17 | 17 | TEMPFILE=.bootstrap.tmp |
18 | - LANG="EN_US" | |
19 | - "$SVN" info > $TEMPFILE 2>&1 | |
18 | + LANG="EN_US" "$SVN" info > $TEMPFILE 2>&1 | |
20 | 19 | |
21 | 20 | if [ "$?" == "0" ]; then |
22 | 21 | PACKAGE_REVISION=$(cat $TEMPFILE | grep "^Revision: " | cut -d" " -f2) |
... | ... | @@ -36,11 +35,11 @@ if test -z $PACKAGE_SOURCE ; then |
36 | 35 | PACKAGE_SOURCE="http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270" |
37 | 36 | fi |
38 | 37 | |
39 | -echo "PACKAGE_REVISION=$PACKAGE_REVISION" > $out/revision | |
40 | -echo "PACKAGE_SOURCE=$PACKAGE_SOURCE" >> $out/revision | |
38 | +echo "PACKAGE_REVISION=$PACKAGE_REVISION" > $srcdir/revision | |
39 | +echo "PACKAGE_SOURCE=$PACKAGE_SOURCE" >> $srcdir/revision | |
41 | 40 | |
42 | -echo "m4_define([SVN_REVISION], $PACKAGE_REVISION)" > $out/revision.m4 | |
43 | -echo "m4_define([SVN_URL], $PACKAGE_SOURCE)" >> $out/revision.m4 | |
41 | +echo "m4_define([SVN_REVISION], $PACKAGE_REVISION)" > $srcdir/revision.m4 | |
42 | +echo "m4_define([SVN_URL], $PACKAGE_SOURCE)" >> $srcdir/revision.m4 | |
44 | 43 | |
45 | 44 | aclocal |
46 | 45 | if test $? != 0 ; then |
... | ... | @@ -55,5 +54,7 @@ if test $? != 0 ; then |
55 | 54 | fi |
56 | 55 | |
57 | 56 | echo "Package set to revision $PACKAGE_REVISION and source $PACKAGE_SOURCE" |
58 | -echo "./configure to setup" | |
57 | + | |
58 | +cd "$olddir" | |
59 | +test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" | |
59 | 60 | ... | ... |