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

Summary:
Now we cannot have a designated build directory for building EFL. We have to build from the same source folder only. So have modified autogen.sh script
so that we can build from any directory. This is similar to the one which I had submitted for Enlightenment and Elementary.

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

Reviewers: devilhorns, cedric, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Srivardhan Hebbar 2014-09-24 10:20:07 +02:00 committed by Cedric BAIL
parent 43e8aeee1b
commit 4d0483608e
1 changed files with 29 additions and 22 deletions

View File

@ -1,32 +1,39 @@
#!/bin/sh #!/bin/sh
rm -rf autom4te.cache test -n "$srcdir" || srcdir=`dirname "$0"`
rm -f aclocal.m4 ltmain.sh test -n "$srcdir" || srcdir=.
(
cd "$srcdir" &&
(
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
autoreconf -vif autoreconf -vif
)
W=0 W=0
rm -f config.cache-env.tmp rm -f config.cache-env.tmp
echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
cmp config.cache-env.tmp config.cache-env >> /dev/null cmp config.cache-env.tmp config.cache-env >> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
W=1; W=1;
fi fi
if [ $W -ne 0 ]; then if [ $W -ne 0 ]; then
echo "Cleaning configure cache..."; echo "Cleaning configure cache...";
rm -f config.cache config.cache-env rm -f config.cache config.cache-env
mv config.cache-env.tmp config.cache-env mv config.cache-env.tmp config.cache-env
else else
rm -f config.cache-env.tmp rm -f config.cache-env.tmp
fi fi
)
if [ -z "$NOCONFIGURE" ]; then if [ -z "$NOCONFIGURE" ]; then
exec ./configure -C "$@" exec $srcdir/configure -C "$@"
fi fi