automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-675-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-675-gb6c3ed5
Date: Fri, 27 Jan 2012 11:24:17 +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 Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b6c3ed5e0debbeb47c4316afb62e8415ed76f26f

The branch, maint has been updated
       via  b6c3ed5e0debbeb47c4316afb62e8415ed76f26f (commit)
      from  af5f9390a4fe3268944823ab0f3ac5af4fcf8bb0 (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 b6c3ed5e0debbeb47c4316afb62e8415ed76f26f
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 26 18:00:40 2012 +0100

    warnings: more precise category and message for one warning
    
    If automake detected an usage like "AC_CONFIG_FILES([./Makefile])"
    in configure.ac, it warned that such an usage was unportable to
    non-GNU make implementations.  But the truth is actually worse:
    that is actually *unportable to GNU make* itself, since it breaks
    the automatic remake rules in subtle ways.
    
    So we now reveal this breakage in a new test case, and enhance
    the warning by giving it a more precise and correct wording, and
    by moving it from the category 'portability' to the category
    'unsupported'.
    
    * automake.in (scan_autoconf_config_files): Improve the warning.
    * tests/conffile-leading-dot.test: New test.
    * tests/list-of-tests.mk: Add it.

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

Summary of changes:
 automake.in                     |    9 +++--
 tests/conffile-leading-dot.test |   62 +++++++++++++++++++++++++++++++++++++++
 tests/list-of-tests.mk          |    1 +
 3 files changed, 68 insertions(+), 4 deletions(-)
 create mode 100755 tests/conffile-leading-dot.test

diff --git a/automake.in b/automake.in
index abca23d..cdbb820 100644
--- a/automake.in
+++ b/automake.in
@@ -5253,10 +5253,11 @@ sub scan_autoconf_config_files ($$)
       # Handle $local:$input syntax.
       my ($local, @rest) = split (/:/);
       @rest = ("$local.in",) unless @rest;
-      msg ('portability', $where,
-         "Omit leading `./' from config file names such as `$local',"
-         . "\nas not all make implementations treat `file' and `./file' 
equally.")
-       if ($local =~ /^\.\//);
+      # Keep in sync with 'conffile-leading-dot.test'.
+      msg ('unsupported', $where,
+           "omit leading './' from config file names such as '$local';"
+           . "\nremake rules might be subtly broken otherwise")
+        if ($local =~ /^\.\//);
       my $input = locate_am @rest;
       if ($input)
        {
diff --git a/tests/conffile-leading-dot.test b/tests/conffile-leading-dot.test
new file mode 100755
index 0000000..1d3d12f
--- /dev/null
+++ b/tests/conffile-leading-dot.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2012 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 2, 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/>.
+
+# Automake must complain if AC_CONFIG_FILES is passed something starting
+# with a dot (like "./Makefile"), since the remake rules might be subtly
+# broken in that case.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([./Makefile])
+AC_CONFIG_FILES([./foo:a.in:b.in:c.in])
+AC_OUTPUT
+END
+
+echo foo = barbarbar > Makefile.am
+
+touch a.in b.in c.in
+
+$ACLOCAL
+
+AUTOMAKE_fails -Wnone -Wunsupported
+grep "^configure\.in:3:.*'\\./Makefile'" stderr
+grep "^configure\.in:3:.* omit leading '\\./'" stderr
+grep "^configure\.in:3:.*remake rules might be subtly broken" stderr
+grep "^configure\.in:4:.*'\\./foo'" stderr
+grep "^configure\.in:4:.* omit leading '\\./'" stderr
+grep "^configure\.in:4:.*remake rules might be subtly broken" stderr
+
+# Check that our warning was actually justified.
+$AUTOCONF
+$AUTOMAKE -Wall -Wno-unsupported
+./configure
+$MAKE
+grep barbarbar Makefile
+# No need to sleep here, configure did that for us already.
+echo foo = bazbazbaz > Makefile.am
+# Check that remake rules do truly break -- otherwise automake is
+# giving a bogus warning.
+$MAKE 2>stderr && { cat stderr >&2 Exit 1; }
+cat stderr >&2
+grep "config\\.status:.*invalid argument.*[\`\"']Makefile[\`\"']" stderr
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 556989e..c35589f 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -244,6 +244,7 @@ configure.test \
 confdeps.test \
 conff.test \
 conff2.test \
+conffile-leading-dot.test \
 confh.test \
 confh4.test \
 confh5.test \


hooks/post-receive
-- 
GNU Automake



reply via email to

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