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.61a-311


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-311-g952adbf
Date: Mon, 26 Nov 2007 18:41:04 +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=952adbf38941fb36b345aa4efb861fa8efd9f2e5

The branch, master has been updated
       via  952adbf38941fb36b345aa4efb861fa8efd9f2e5 (commit)
      from  ee28883f0eb709933bad58b4b84575210c3fd939 (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 952adbf38941fb36b345aa4efb861fa8efd9f2e5
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Nov 26 19:40:50 2007 +0100

    Fix autom4te for unusual characters in input file names.
    
    * bin/autom4te.in (files_to_options): Quote active characters
    for the shell.
    * tests/tools.at (autom4te and white space in file names):
    New test.

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

Summary of changes:
 ChangeLog       |    6 ++++++
 bin/autom4te.in |    8 +++++---
 tests/tools.at  |   18 ++++++++++++++++++
 3 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7d35a0b..b1af40e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-11-26  Ralf Wildenhues  <address@hidden>
 
+       Fix autom4te for unusual characters in input file names.
+       * bin/autom4te.in (files_to_options): Quote active characters
+       for the shell.
+       * tests/tools.at (autom4te and white space in file names):
+       New test.
+
        * doc/autoconf.texi (Limitations of Usual Tools) <awk>:
        Document that Tru64 awk always splits $0.
 
diff --git a/bin/autom4te.in b/bin/autom4te.in
index 19bb964..b273b9a 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -235,14 +235,16 @@ sub files_to_options (@)
   my @res;
   foreach my $file (@file)
     {
+      (my $arg = $file) =~ s/'/'\\''/g;
       if ($file =~ /\.m4f$/)
        {
-         push @res, "--reload-state=$file";
+         $arg = "--reload-state=$file";
        }
-      else
+      if ($file =~ /[\t "'\\\$()]/)
        {
-         push @res, $file;
+         $arg = "'$arg'";
        }
+      push @res, $arg;
     }
   return join ' ', @res;
 }
diff --git a/tests/tools.at b/tests/tools.at
index aca2808..4096d9e 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -138,6 +138,24 @@ AT_CHECK([cat file], 0,
 AT_CLEANUP
 
 
+# autom4te and file names containing white space
+# ----------------------------------------------
+
+AT_SETUP([autom4te and white space in file names])
+
+file='file with  funny \ '\'' \'\'' $ & #!*? name'
+cat >"$file.m4" <<'END'
+right
+END
+# skip if we cannot create such a file
+AT_CHECK([test -f "$file.m4" || exit 77])
+AT_CHECK_AUTOM4TE([-o "$file" "$file.m4"])
+
+AT_CHECK([cat "$file"], [],
+[[right
+]])
+
+AT_CLEANUP
 
 
 ## ------------------ ##


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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