summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2014-09-22 14:37:57 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-09-22 14:38:34 +0200
commit90f0ac4b6b254975cd8932593ba0d660e8a85527 (patch)
treeca9b3c17e22a0fa70e161eae3a9fcbb3819eed75
parent6a10850f6c8b034e691f080eeb4c57fba9368e27 (diff)
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>
-rwxr-xr-xlegacy/elementary/autogen.sh77
1 files changed, 42 insertions, 35 deletions
diff --git a/legacy/elementary/autogen.sh b/legacy/elementary/autogen.sh
index b814903b86..d7ab12330f 100755
--- a/legacy/elementary/autogen.sh
+++ b/legacy/elementary/autogen.sh
@@ -1,40 +1,47 @@
1#!/bin/sh 1#!/bin/sh
2 2
3rm -rf autom4te.cache 3test -n "$srcdir" || srcdir=`dirname "$0"`
4rm -f aclocal.m4 ltmain.sh 4test -n "$srcdir" || srcdir=.
5 5(
6touch README 6 cd "$srcdir" &&
7touch ABOUT-NLS 7 (
8 8 rm -rf autom4te.cache
9echo "Running autopoint..." ; autopoint -f || : 9 rm -f aclocal.m4 ltmain.sh
10echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 10
11echo "Running autoheader..." ; autoheader || exit 1 11 touch README
12echo "Running autoconf..." ; autoconf || exit 1 12 touch ABOUT-NLS
13echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 13
14echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 14 echo "Running autopoint..." ; autopoint -f || :
15 15 echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
16W=0 16 echo "Running autoheader..." ; autoheader || exit 1
17 17 echo "Running autoconf..." ; autoconf || exit 1
18rm -f config.cache-env.tmp 18 echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
19echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp 19 echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
20echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp 20 )
21echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp 21
22echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp 22 W=0
23echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp 23
24 24 rm -f config.cache-env.tmp
25cmp config.cache-env.tmp config.cache-env >> /dev/null 25 echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
26if [ $? -ne 0 ]; then 26 echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
27 W=1; 27 echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
28fi 28 echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
29 29 echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
30if [ $W -ne 0 ]; then 30
31 echo "Cleaning configure cache..."; 31 cmp config.cache-env.tmp config.cache-env >> /dev/null
32 rm -f config.cache config.cache-env 32 if [ $? -ne 0 ]; then
33 mv config.cache-env.tmp config.cache-env 33 W=1;
34else 34 fi
35 rm -f config.cache-env.tmp 35
36fi 36 if [ $W -ne 0 ]; then
37 echo "Cleaning configure cache...";
38 rm -f config.cache config.cache-env
39 mv config.cache-env.tmp config.cache-env
40 else
41 rm -f config.cache-env.tmp
42 fi
43)
37 44
38if [ -z "$NOCONFIGURE" ]; then 45if [ -z "$NOCONFIGURE" ]; then
39 ./configure -C "$@" 46 $srcdir/configure -C "$@"
40fi 47fi