r16174 - gnucash/trunk - Allow running autogen.sh from the build directory by cd'ing into the source tree.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Jun 17 00:12:03 EDT 2007


Author: andi5
Date: 2007-06-17 00:12:02 -0400 (Sun, 17 Jun 2007)
New Revision: 16174
Trac: http://svn.gnucash.org/trac/changeset/16174

Modified:
   gnucash/trunk/autogen.sh
Log:
Allow running autogen.sh from the build directory by cd'ing into the source tree.

The source tree is either $srcdir, `dirname $0` or .


Modified: gnucash/trunk/autogen.sh
===================================================================
--- gnucash/trunk/autogen.sh	2007-06-17 01:23:40 UTC (rev 16173)
+++ gnucash/trunk/autogen.sh	2007-06-17 04:12:02 UTC (rev 16174)
@@ -1,8 +1,9 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
 
-# Set ${srcdir} to .
-: ${srcdir=.}
+if test -z "$srcdir" ; then srcdir=`dirname $0` ; fi
+if test -z "$srcdir" ; then srcdir=.            ; fi
+cd $srcdir
 
 DIE=0
 
@@ -190,13 +191,11 @@
 # All programs are available. So now actually call them in the
 # required order.
 
-dr=${srcdir}
-
 echo "Creating $dr/po/POTFILES.in ..."
-test -r $dr/po/POTFILES.in || touch $dr/po/POTFILES.in
+test -r po/POTFILES.in || touch po/POTFILES.in
 
 echo "Creating $dr/aclocal.m4 ..."
-test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+test -r aclocal.m4 || touch aclocal.m4
 
 echo "Running ${GLIB_GETTEXTIZE} --force --copy ...  "
 echo "GnuCash note: Please ignore the output of ${GLIB_GETTEXTIZE} below!"
@@ -204,11 +203,11 @@
 echo "GnuCash note: Please ignore the output of ${GLIB_GETTEXTIZE} above!"
 echo
 
-echo "Ensure $dr/aclocal.m4 is writable ..."
-test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+echo "Ensure aclocal.m4 is writable ..."
+test -r aclocal.m4 && chmod u+w aclocal.m4
 
-echo "Ensure $dr/po/POTFILES.in is writable ..."
-test -r $dr/po/POTFILES.in && chmod u+w $dr/po/POTFILES.in
+echo "Ensure po/POTFILES.in is writable ..."
+test -r po/POTFILES.in && chmod u+w po/POTFILES.in
 
 echo "Running ${INTLTOOLIZE} --force --copy ..."
 ${INTLTOOLIZE} --force --copy || \



More information about the gnucash-changes mailing list