autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.65-23-g


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.65-23-g13e3570
Date: Wed, 06 Jan 2010 19:18:24 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=13e3570bc9cd43f2a036adb45497c96da65331e0

The branch, master has been updated
       via  13e3570bc9cd43f2a036adb45497c96da65331e0 (commit)
      from  acf0439102e956cf2ec30005a560bd1192663119 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 13e3570bc9cd43f2a036adb45497c96da65331e0
Author: Peter Breitenlohner <address@hidden>
Date:   Wed Jan 6 20:14:53 2010 +0100

    Fix AC_CONFIG_LINKS to generated files when srcdir is absolute.
    
    * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Check $ac_source,
    not $srcdir, for being relative or absolute.
    * tests/torture.at (AC_CONFIG_LINKS): New test.
    (AC_CONFIG_LINKS and identical files): Extend test, avoid some
    forks.
    Report, patch and testcase example by Peter Breitenlohner.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   11 +++++++
 lib/autoconf/status.m4 |    2 +-
 tests/torture.at       |   73 ++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 83 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2765bda..d5fc01d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-06  Peter Breitenlohner  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Fix AC_CONFIG_LINKS to generated files when srcdir is absolute.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Check $ac_source,
+       not $srcdir, for being relative or absolute.
+       * tests/torture.at (AC_CONFIG_LINKS): New test.
+       (AC_CONFIG_LINKS and identical files): Extend test, avoid some
+       forks.
+       Report, patch and testcase example by Peter Breitenlohner.
+
 2010-01-05  Eric Blake  <address@hidden>
 
        Improve release automation.
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 4f4e843..f74bd34 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -974,7 +974,7 @@ m4_define([_AC_OUTPUT_LINK],
     rm -f "$ac_file"
 
     # Try a relative symlink, then a hard link, then a copy.
-    case $srcdir in
+    case $ac_source in
     [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$ac_source ;;
        *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
     esac
diff --git a/tests/torture.at b/tests/torture.at
index f00498f..ceea62c 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1160,6 +1160,61 @@ AT_CHECK_CONFIGURE([], 1, ignore, ignore)
 AT_CLEANUP
 
 
+## ----------------- ##
+## AC_CONFIG_LINKS.  ##
+## ----------------- ##
+
+AT_SETUP([AC_CONFIG_LINKS])
+
+AT_DATA([configure.ac],
+[[AC_INIT([config links to config files test], [1.0])
+AC_CONFIG_SRCDIR([sub1/file1.in])
+AC_CONFIG_FILES([sub1/file1 file2])
+AC_CONFIG_LINKS([file1:sub1/file1 sub2/file2:file2])
+AC_OUTPUT
+]])
+
+mkdir sub1
+
+AT_DATA([sub1/file1.in],
+[[/* @configure_input@ */
+#define PACKAGE_STRING "@PACKAGE_STRING@"
+]])
+
+AT_DATA([file2.in],
+[[/* @configure_input@ */
+#define PACKAGE_STRING "@PACKAGE_STRING@"
+]])
+
+mkdir build
+AT_CHECK_AUTOCONF
+cd build
+AT_CHECK([../configure && ../configure], 0, [ignore])
+AT_CHECK([cat sub1/file1 sub2/file2 | grep -c "config links"], 0, [2
+])
+AT_CHECK([../configure && ../configure], 0, [ignore])
+AT_CHECK([cat sub1/file1 sub2/file2 | grep -c "config links"], 0, [2
+])
+cd ..
+rm -rf build
+mkdir build
+cd build
+cwd=`pwd`
+AT_CHECK(["$cwd"/../configure && "$cwd"/../configure], 0, [ignore])
+AT_CHECK([cat sub1/file1 sub2/file2 | grep -c "config links"], 0, [2
+])
+cd ..
+AT_CHECK([./configure && ./configure], 0, [ignore], [stderr])
+AT_CHECK([cat sub1/file1 sub2/file2 | grep -c "config links"], 0, [2
+])
+cwd=`pwd`
+AT_CHECK(["$cwd"/configure && "$cwd"/configure], 0, [ignore], [ignore])
+AT_CHECK([cat sub1/file1 sub2/file2 | grep -c "config links"], 0, [2
+])
+
+AT_CLEANUP
+
+
 ## ------------------------------------- ##
 ## AC_CONFIG_LINKS and identical files.  ##
 ## ------------------------------------- ##
@@ -1182,6 +1237,20 @@ AT_CHECK([../configure $configure_options && 
../configure $configure_options],
 AT_CHECK([cat src/s src/t], 0, [file1
 file2
 ])
+
+cd ..
+rm -rf build
+mkdir build
+cd build
+cwd=`pwd`
+AT_CHECK(["$cwd"/../configure], 0, [ignore])
+AT_CHECK([cat src/s src/t], 0, [file1
+file2
+])
+AT_CHECK(["$cwd"/../configure], 0, [ignore])
+AT_CHECK([cat src/s src/t], 0, [file1
+file2
+])
 cd ..
 AT_CHECK([./configure $configure_options && ./configure $configure_options],
         0, [ignore], [stderr])
@@ -1189,8 +1258,8 @@ AT_CHECK([grep src/t stderr], 1)
 AT_CHECK([cat src/s src/t], 0, [file1
 file2
 ])
-AT_CHECK(["`pwd`"/configure $configure_options && "`pwd`"/configure 
$configure_options],
-        0, [ignore], [ignore])
+cwd=`pwd`
+AT_CHECK(["$cwd"/configure && "$cwd"/configure], 0, [ignore], [ignore])
 AT_CHECK([cat src/s src/t], 0, [file1
 file2
 ])


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]