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-106-


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.65-106-g7eccc09
Date: Wed, 23 Jun 2010 20:24:01 +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=7eccc094e839b50cb3f95ef8650c5a9def116749

The branch, master has been updated
       via  7eccc094e839b50cb3f95ef8650c5a9def116749 (commit)
      from  d11a65ced676409559ac09150b93be9c1eb99736 (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 7eccc094e839b50cb3f95ef8650c5a9def116749
Author: Ralf Wildenhues <address@hidden>
Date:   Wed Jun 23 19:23:12 2010 +0200

    Improve VPATH handling in config.status for non-Automake projects.
    
    * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Be sure not
    to remove references to a subdir of srcdir.  Fix treatment of
    multiple colon-separated VPATH entries.
    * tests/torture.at (VPATH): New test.
    Report by Keith Marshall.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog              |    7 ++++
 lib/autoconf/status.m4 |   22 ++++++++----
 tests/torture.at       |   86 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 108 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d3983c1..c742adb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-06-23  Ralf Wildenhues  <address@hidden>
 
+       Improve VPATH handling in config.status for non-Automake projects.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Be sure not
+       to remove references to a subdir of srcdir.  Fix treatment of
+       multiple colon-separated VPATH entries.
+       * tests/torture.at (VPATH): New test.
+       Report by Keith Marshall.
+
        Further improve docs about nested double-quotes and backquotes.
        * doc/autoconf.texi (Shellology): Remove anchor for pdksh.
        Move quoting bug example to ...
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index fd3c5da..b9e7026 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -552,17 +552,25 @@ fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
   || AC_MSG_ERROR([could not setup config files machinery])
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub=['/^[        ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:address@hidden@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
+  ac_vpsub=['/^[        ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[      ]*$//
 }']
 fi
diff --git a/tests/torture.at b/tests/torture.at
index dc906a8..27405b7 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1151,6 +1151,92 @@ AT_CHECK([cd at-dir && "$at_here/configure" 
$configure_options], [], [ignore])
 AT_CLEANUP
 
 
+## ------- ##
+## VPATH.  ##
+## ------- ##
+
+AT_SETUP([VPATH])
+
+dirs='at paren brace space'
+for dir in $dirs; do
+  mkdir $dir $dir/s1 $dir/s2
+  touch $dir/f $dir/s1/f1 $dir/s2/f2
+done
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_CONFIG_FILES([at/Makefile paren/Makefile brace/Makefile space/Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([at/Makefile.in],
+[[# This is what you should use in order to be portable to old makes.
+srcdir = @srcdir@
+VPATH = @srcdir@/s1:@srcdir@:@srcdir@/s2
+all: f f1 f2
+       @echo ok
+]])
+
+AT_DATA([paren/Makefile.in],
+[[# This works with some makes but not with old ones.
+srcdir = @srcdir@
+VPATH = $(srcdir)/s1:$(srcdir):$(srcdir)/s2
+all: f f1 f2
+       @echo ok
+]])
+
+AT_DATA([brace/Makefile.in],
+[[# This works with some makes but not with old ones.
+srcdir = @srcdir@
+VPATH = ${srcdir}/s1:${srcdir}:${srcdir}/s2
+all: f f1 f2
+       @echo ok
+]])
+
+AT_DATA([space/Makefile.in],
+[[# This fails with FreeBSD make, for example.
+srcdir = @srcdir@
+VPATH = @srcdir@/s1 @srcdir@ @srcdir@/s2
+all: f f1 f2
+       @echo ok
+]])
+
+AT_CHECK_AUTOCONF
+
+: ${MAKE=make}
+
+# In place.
+AT_CHECK([./configure $configure_options], [], [ignore])
+# Treat BSD make separately, afterwards, for maximal coverage.
+dirs='at paren brace'
+for dir in $dirs; do
+  AT_CHECK([cd $dir && $MAKE], [], [ignore], [ignore])
+done
+
+rm -f config.status
+mkdir build absbuild
+
+# Relative name.
+AT_CHECK([cd build && ../configure $configure_options], [], [ignore])
+for dir in $dirs; do
+  AT_CHECK([cd build/$dir && $MAKE], [], [ignore], [ignore])
+done
+
+# Absolute name.
+at_here=`pwd`
+AT_CHECK([cd absbuild && "$at_here/configure" $configure_options], [], 
[ignore])
+for dir in $dirs; do
+  AT_CHECK([cd absbuild/$dir && $MAKE], [], [ignore], [ignore])
+done
+
+# These will not pass with BSD make.
+AT_CHECK([cd space && { $MAKE || exit 77; }], [], [ignore], [ignore])
+AT_CHECK([cd build/space && $MAKE], [], [ignore], [ignore])
+AT_CHECK([cd absbuild/space && $MAKE], [], [ignore], [ignore])
+
+AT_CLEANUP
+
+
 ## ----------------- ##
 ## Signal handling.  ##
 ## ----------------- ##


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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