Commit bd89ad25f3a23cf9f2d8f259e02487c4178c339b

Authored by perry.werneck@gmail.com
1 parent ae4b6698

autogen passa a rodar o ./configure automaticamente

Showing 1 changed file with 13 additions and 12 deletions   Show diff stats
1 #!/bin/bash 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 if test -e revision ; then 9 if test -e revision ; then
10 . revision 10 . revision
@@ -15,8 +15,7 @@ SVN=`which svn 2> /dev/null` @@ -15,8 +15,7 @@ SVN=`which svn 2> /dev/null`
15 if test -x "$SVN" ; then 15 if test -x "$SVN" ; then
16 16
17 TEMPFILE=.bootstrap.tmp 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 if [ "$?" == "0" ]; then 20 if [ "$?" == "0" ]; then
22 PACKAGE_REVISION=$(cat $TEMPFILE | grep "^Revision: " | cut -d" " -f2) 21 PACKAGE_REVISION=$(cat $TEMPFILE | grep "^Revision: " | cut -d" " -f2)
@@ -36,11 +35,11 @@ if test -z $PACKAGE_SOURCE ; then @@ -36,11 +35,11 @@ if test -z $PACKAGE_SOURCE ; then
36 PACKAGE_SOURCE="http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270" 35 PACKAGE_SOURCE="http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270"
37 fi 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 aclocal 44 aclocal
46 if test $? != 0 ; then 45 if test $? != 0 ; then
@@ -55,5 +54,7 @@ if test $? != 0 ; then @@ -55,5 +54,7 @@ if test $? != 0 ; then
55 fi 54 fi
56 55
57 echo "Package set to revision $PACKAGE_REVISION and source $PACKAGE_SOURCE" 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