autotools: modified autogen.sh to be able to build from different directory.

Summary:
Right now we cannot have a designated build directory and we should build in the source directory. So the proposed solution lets you to build from any directory.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D1395

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Srivardhan Hebbar 2014-09-22 14:37:57 +02:00 committed by Cedric BAIL
parent 6a10850f6c
commit 90f0ac4b6b
1 changed files with 36 additions and 29 deletions

View File

@ -1,5 +1,10 @@
#!/bin/sh
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
(
cd "$srcdir" &&
(
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
@ -12,6 +17,7 @@ echo "Running autoheader..." ; autoheader || exit 1
echo "Running autoconf..." ; autoconf || exit 1
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
)
W=0
@ -34,7 +40,8 @@ if [ $W -ne 0 ]; then
else
rm -f config.cache-env.tmp
fi
)
if [ -z "$NOCONFIGURE" ]; then
./configure -C "$@"
$srcdir/configure -C "$@"
fi