]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (AT_INIT): Handle absolute `srcdir'.
authorNoah Misch <noah@cs.caltech.edu>
Tue, 19 Jun 2007 19:49:05 +0000 (19:49 +0000)
committerNoah Misch <noah@cs.caltech.edu>
Tue, 19 Jun 2007 19:49:05 +0000 (19:49 +0000)
* tests/autotest.at (srcdir propagation): Test absolute `srcdir' and
`srcdir' as subdirectory of `builddir'.

ChangeLog
lib/autotest/general.m4
tests/autotest.at

index 7dc7bb7b529972c4a83af474a7271e2d2bf4ae11..bf84bebfb59d974e59daf72f7df71bdb75eb4627 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-17  Noah Misch  <noah@cs.caltech.edu>
+
+       * lib/autotest/general.m4 (AT_INIT): Handle absolute `srcdir'.
+       * tests/autotest.at (srcdir propagation): Test absolute `srcdir' and
+       `srcdir' as subdirectory of `builddir'.
+
 2007-06-13  Noah Misch  <noah@cs.caltech.edu>
 
        * lib/autotest/general.m4 (AT_INIT): Compute $srcdir correctly.
index 17e65b567c060edeed97d1c4aec63ba5aee49ec8..91407045e198f393ddc02e09c2536e5499115590 100644 (file)
@@ -220,7 +220,11 @@ if test -n "$at_top_srcdir"; then
   for at_dir in srcdir top_srcdir top_build_prefix
   do
     at_val=AS_VAR_GET([at_$at_dir])
-    AS_VAR_SET([$at_dir], [../../$at_val])
+    case $at_val in
+      [[\\/$]]* | ?:[[\\/]]* ) at_prefix= ;;
+      *) at_prefix=../../ ;;
+    esac
+    AS_VAR_SET([$at_dir], [$at_prefix$at_val])
   done
 fi
 
index fb8f8df1942d77f41f1a62e89ead59557e59a57c..ef9175961c663da96bac27400c7f23321a3f16b1 100644 (file)
@@ -425,7 +425,7 @@ AT_SETUP([srcdir propagation])
 AT_KEYWORDS([autotest])
 AT_CAPTURE_FILE([suite.log])
 
-mkdir pkg vpath-outside
+mkdir pkg vpath-outside vpath-abs
 mkdir pkg/t pkg/vpath-inside
 AT_DATA([pkg/a])
 AT_DATA([pkg/t/b])
@@ -461,6 +461,14 @@ cd t
 AT_CHECK([../../pkg/t/suite], [0], [ignore])
 cd ../..
 
+# Build directory totally outside source directory (absolute).
+my_srcdir=`pwd`/pkg
+cd vpath-abs
+AT_CHECK([top_srcdir=$abs_top_srcdir "$my_srcdir"/configure], [0], [ignore])
+cd t
+AT_CHECK(["$my_srcdir"/t/suite], [0], [ignore])
+cd ../..
+
 # Build directory as subdirectory of source directory.
 cd pkg/vpath-inside
 AT_CHECK([top_srcdir=$abs_top_srcdir ../configure], [0], [ignore])
@@ -468,6 +476,12 @@ cd t
 AT_CHECK([../../t/suite], [0], [ignore])
 cd ../../..
 
+# Build directory as parent of source directory.
+AT_CHECK([top_srcdir=$abs_top_srcdir pkg/configure], [0], [ignore])
+cd t
+AT_CHECK([../pkg/t/suite], [0], [ignore])
+cd ..
+
 # Build directory as source directory.
 cd pkg
 AT_CHECK_CONFIGURE