aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2014-09-24 10:20:07 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-09-24 10:20:13 +0200
commit4d0483608e3b794fdec29a8e82d67f21df3baac8 (patch)
tree0386c90229f832ad555b0bc10e91394e63e97c6b
parentefl build - fix parallel builds with new branch merge from dh (diff)
downloadefl-4d0483608e3b794fdec29a8e82d67f21df3baac8.tar.gz
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>
-rwxr-xr-xautogen.sh51
1 files changed, 29 insertions, 22 deletions
diff --git a/autogen.sh b/autogen.sh
index d8535886a1..0481d71613 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,32 +1,39 @@
#!/bin/sh
-rm -rf autom4te.cache
-rm -f aclocal.m4 ltmain.sh
+test -n "$srcdir" || srcdir=`dirname "$0"`
+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
-echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
-echo "OLD_CFLAGS=\"$CFLAGS\"" >> 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_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
+ rm -f config.cache-env.tmp
+ echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
+ echo "OLD_CFLAGS=\"$CFLAGS\"" >> 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_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
-cmp config.cache-env.tmp config.cache-env >> /dev/null
-if [ $? -ne 0 ]; then
- W=1;
-fi
+ cmp config.cache-env.tmp config.cache-env >> /dev/null
+ if [ $? -ne 0 ]; then
+ W=1;
+ fi
-if [ $W -ne 0 ]; then
- echo "Cleaning configure cache...";
- rm -f config.cache config.cache-env
- mv config.cache-env.tmp config.cache-env
-else
- rm -f config.cache-env.tmp
-fi
+ if [ $W -ne 0 ]; then
+ echo "Cleaning configure cache...";
+ rm -f config.cache config.cache-env
+ mv config.cache-env.tmp config.cache-env
+ else
+ rm -f config.cache-env.tmp
+ fi
+)
if [ -z "$NOCONFIGURE" ]; then
- exec ./configure -C "$@"
+ exec $srcdir/configure -C "$@"
fi