From cf024c2e42214312bd21485f62ba379f1c86633d Mon Sep 17 00:00:00 2001 From: Srivardhan Hebbar Date: Thu, 19 Feb 2015 08:50:34 -0500 Subject: [PATCH] express: Modified autogen.sh to enable building from any directory. Summary: Currently we can build from only src directory. So modified autogen.sh to be able to build from other directories as well. Reviewers: devilhorns Differential Revision: https://phab.enlightenment.org/D1995 --- autogen.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/autogen.sh b/autogen.sh index 854a961..3c1192f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,18 +1,24 @@ #!/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 + touch README + touch ABOUT-NLS -touch README -touch ABOUT-NLS - -echo "Running autopoint..." ; autopoint -f || : -echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1 -echo "Running autoconf..." ; autoconf || exit 1 -echo "Running autoheader..." ; autoheader || exit 1 -echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 -echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + echo "Running autopoint..." ; autopoint -f || : + echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1 + echo "Running autoconf..." ; autoconf || exit 1 + echo "Running autoheader..." ; autoheader || exit 1 + echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 + echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + ) + ) if [ -z "$NOCONFIGURE" ]; then - ./configure "$@" + $srcdir/configure "$@" fi