diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-08-21 09:57:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2005-08-21 09:57:19 +0000 |
commit | 2396b502a5de39ee44d53af971b7382a1f130a87 (patch) | |
tree | f3b9c6e7b021c76bcd3216452f25780b1e0c9e69 /autogen.sh | |
parent | 5462c8a5856f1b3b81889ac3a714e47b047e1984 (diff) |
When invoked as, say, ../autogen.sh, switch to the sourcedir to run the auto*. Based on corresponding code in GTK+'s autogen.sh. (#3402, Thomas Fitzsimmons)
Update from gtk-doc CVS, bringing in some minor output changes. (Eliminate the *** from the messages that don't indicate errors.)
Use += for EXTRA_DIST, since gtk-doc.make already defines it.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh index 8dd21ea68..55886dec1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -25,6 +25,15 @@ LC_NUMERIC=C ARGV0=$0 +# Allow invocation from a separate build directory; in that case, we change +# to the source directory to run the auto*, then change back before running configure +srcdir=`dirname $ARGV0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` + +cd $srcdir + if ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 ; then if ($AUTOCONF --version | head -n 1 | awk 'NR==1 { if( $(NF) >= '$autoconf_min_vers') \ exit 1; exit 0; }'); @@ -133,4 +142,6 @@ do_cmd $AUTOMAKE $AUTOMAKE_FLAGS do_cmd $AUTOCONF -do_cmd ./configure --enable-maintainer-mode --enable-gtk-doc ${1+"$@"} && echo "Now type \`make' to compile" || exit 1 +cd $ORIGDIR || exit 1 + +do_cmd $srcdir/configure --enable-maintainer-mode --enable-gtk-doc ${1+"$@"} && echo "Now type \`make' to compile" || exit 1 |