]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Fix 'config.status --file=... depfiles' with new Autoconf.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 26 Oct 2008 14:55:22 +0000 (15:55 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 26 Oct 2008 15:01:48 +0000 (16:01 +0100)
* m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Eval
$CONFIG_STATUS contents if we detect the quoting used by
Autoconf 2.62 and newer for --file=.
* tests/depend5.test: New test.
* tests/Makefile.am: Update.
* NEWS, THANKS: Update.
Report by Sam Steingold against gnulib.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
THANKS
m4/depout.m4
tests/Makefile.am
tests/Makefile.in
tests/depend5.test [new file with mode: 0755]

index 2c0a326a8a257c34f23d395718d032ada3cbe6b3..44645494a9ea5fec8558a59dc67e518811f1687f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-10-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix 'config.status --file=... depfiles' with new Autoconf.
+       * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Eval
+       $CONFIG_STATUS contents if we detect the quoting used by
+       Autoconf 2.62 and newer for --file=.
+       * tests/depend5.test: New test.
+       * tests/Makefile.am: Update.
+       * NEWS, THANKS: Update.
+       Report by Sam Steingold against gnulib.
+
 2008-10-26  Johan Dahlin  <jdahlin@async.com.br>
 
        Support for Python 3.0, drop support for pre-2.0.
diff --git a/NEWS b/NEWS
index 42107a2e2603df4d294678e22def7bd43d8d4dd9..dce4bbd38acc5e6c6e0e55ff9534a4174a939c3c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -115,6 +115,10 @@ Bugs fixed in 1.10a:
   - For nobase_*_LTLIBRARIES with nonempty directory components, the
     correct `-rpath' argument is used now.
 
+  - `config.status --file=Makefile depfiles' now also works with the
+    extra quoting used internally used by Autoconf 2.62 and newer
+    (it used to work only without the `--file=' bit).
+
 * Bugs introduced by 1.10:
 
   - Fix output of dummy dependency files in presence of post-processed
diff --git a/THANKS b/THANKS
index f79a7a06bb54b1e7ef21f35b190762116107ed21..eb67976e04cebef3d8c10b96e8df88c29ae7d48c 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -280,6 +280,7 @@ Rusty Ballinger             rusty@rlyeh.engr.sgi.com
 Ryan T. Sammartino     ryants@shaw.ca
 Sam Hocevar            sam@zoy.org
 Sam Sirlin             sam@kalessin.jpl.nasa.gov
+Sam Steingold          sds@gnu.org
 Sander Niemeijer       niemeijer@science-and-technology.nl
 Santiago Vila          sanvila@unex.es
 Scott James Remnant    scott@netsplit.com
index a7cc30abfc2550290d6db693e3decf870d966011..3f5d6cf1a5437a9109b7288d91999430cf7ddda9 100644 (file)
@@ -1,18 +1,27 @@
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 4
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
+[# Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
   # Strip MF so we end up with the name of the file.
   mf=`echo "$mf" | sed -e 's/:.*$//'`
   # Check whether this is an Automake generated Makefile or not.
index cc95743d4171076f4debb1a05c90ee2f87f8e91b..77dd1f14a9161f11866379da400f719c70a732a9 100644 (file)
@@ -222,6 +222,7 @@ depend.test \
 depend2.test \
 depend3.test \
 depend4.test \
+depend5.test \
 destdir.test \
 dirforbid.test \
 dirlist.test \
index 9eec0166fd45e7b32eb7ffc440a7cd5a41dda0ad..67e5420bdd08398b5334261e7a2a844dbcfe2f26 100644 (file)
@@ -374,6 +374,7 @@ depend.test \
 depend2.test \
 depend3.test \
 depend4.test \
+depend5.test \
 destdir.test \
 dirforbid.test \
 dirlist.test \
diff --git a/tests/depend5.test b/tests/depend5.test
new file mode 100755 (executable)
index 0000000..5644933
--- /dev/null
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that _AM_OUTPUT_DEPENDENCY_COMMANDS works with eval-style
+# quoting in $CONFIG_FILES, done by newer Autoconf.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in << END
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foo.h
+END
+
+cat >foo.c << END
+#include "foo.h"
+END
+: >foo.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure --enable-dependency-tracking
+if test -d .deps; then
+  depdir=.deps
+elif test -d _deps; then
+  depdir=_deps
+else
+  depdir=
+fi
+
+# For the fun of it, we should also cope with makefile
+# names that contain weird characters, with Autoconf 2.62
+# and newer.
+name='weird  name with $ `#() &! characters"'
+cp Makefile.in "$name.in"
+
+for arg in Makefile \
+  --file=Makefile \
+  "--file=$name"
+do
+  rm -rf .deps _deps
+  ./config.status "$arg" depfiles >stdout 2>stderr
+  cat stdout
+  cat stderr >&2
+  grep '[Nn]o such file' stderr && Exit 1
+
+  if test -n "$depdir"; then
+    test -d $depdir || Exit 1
+  fi
+done
+: