Browse Source

autogen.sh can now be executed from any current working directory

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Toni Uhlig 2 years ago
parent
commit
9922993eb2
1 changed files with 8 additions and 1 deletions
  1. 8 1
      autogen.sh

+ 8 - 1
autogen.sh

@@ -2,6 +2,11 @@
 
 set -x
 
+OLD_WD="$(pwd)"
+NEW_WD="$(dirname ${0})"
+
+cd "${NEW_WD}"
+
 if ! autoreconf -fi; then
     aclocal
     autoheader
@@ -9,4 +14,6 @@ if ! autoreconf -fi; then
     autoconf
 fi
 
-$(dirname $0)/configure $@ && make -j${BUILDJOBS:-4} all
+cd "${OLD_WD}"
+
+"${NEW_WD}/configure" $@ && make clean && make -j${BUILDJOBS:-4} all