cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4d0483608e3b794fdec29a8e82d67f21df3baac8

commit 4d0483608e3b794fdec29a8e82d67f21df3baac8
Author: Srivardhan Hebbar <[email protected]>
Date:   Wed Sep 24 10:20:07 2014 +0200

    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 <[email protected]>
    
    Reviewers: devilhorns, cedric, raster
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1480
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 autogen.sh | 51 +++++++++++++++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 22 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index d853588..0481d71 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

-- 


Reply via email to