automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-3


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-340-ga881f72
Date: Tue, 29 May 2012 17:47:49 +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=a881f72548360ed66b5b7c9189cb7c27992e06e6

The branch, ng/master has been updated
       via  a881f72548360ed66b5b7c9189cb7c27992e06e6 (commit)
       via  3c7b2a92e7d143c40f6c28b1afc975def1bb5011 (commit)
       via  f5421bffffbbbd3c03859162ad68adde17ecb0f1 (commit)
       via  d90fca070656c1da148a4619e05f764345d206dd (commit)
      from  9a603b0b2cc87bab6bfa0e749269a8635b106699 (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 a881f72548360ed66b5b7c9189cb7c27992e06e6
Merge: f5421bf 3c7b2a9
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 29 19:18:07 2012 +0200

    Merge branch 'ng/drop-configure-in' into ng/master
    
    * ng/drop-configure-in:
      [ng] missing: configure.in is unsupported now, just assume configure.ac

commit 3c7b2a92e7d143c40f6c28b1afc975def1bb5011
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 29 19:17:37 2012 +0200

    [ng] missing: configure.in is unsupported now, just assume configure.ac
    
    * lib/missing ($configure_ac): Simply define to configure.ac.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f5421bffffbbbd3c03859162ad68adde17ecb0f1
Merge: 9a603b0 d90fca0
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 29 19:08:52 2012 +0200

    Merge branch 'ng/suffix-rules-old-fashioned' into ng/master
    
    * ng/suffix-rules-old-fashioned:
      [ng] suffix: don't reject old-fashioned suffix rules anymore

commit d90fca070656c1da148a4619e05f764345d206dd
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 29 13:45:46 2012 +0200

    [ng] suffix: don't reject old-fashioned suffix rules anymore
    
    Now that, after today's commit 'v1.12-331-g645bb21', Automake-NG does
    not follow the chain of user-defined pattern rules anymore, there's no
    need to treat such rules preferentially, nor to reject old-fashioned
    suffix rules.  This will help interoperability with tools like Gnulib,
    which generated Makefile.am fragments that still uses old-fashioned
    suffix rules (since they are targeted to mainline Automake).
    
    * automake.in (handle_footer): Do not reject the '.SUFFIXES:' rule
    nor the 'SUFFIXES' variable.  Add a "FIXME" comment about why we
    still support the 'SUFFIXES' variable.
    * lib/Automake/Rule.pm: Do not error out if an old-fashioned suffix
    rule is seen.
    * lib/am/footer.am (.SUFFIXES): Depend on '$(SUFFIXES)', if that's
    non-empty.
    * t/suffix-rules-reject.sh: Remove.
    * t/suffix-rules-old-fashioned.sh: New.
    * NG-NEWS: Adjust.
    * doc/automake-ng.texi (Suffixes): Do not state that Automake-NG
    rejects attempts to define old-fashioned suffix rules.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NG-NEWS                                            |   12 ----
 automake.in                                        |    9 +--
 doc/automake-ng.texi                               |    6 --
 lib/Automake/Rule.pm                               |   10 ----
 lib/am/footer.am                                   |    4 +-
 lib/missing                                        |    8 +---
 ...parent-dir.sh => suffix-rules-old-fashioned.sh} |   55 ++++++++++++++------
 t/suffix-rules-reject.sh                           |   55 --------------------
 8 files changed, 45 insertions(+), 114 deletions(-)
 copy t/{dist-included-parent-dir.sh => suffix-rules-old-fashioned.sh} (53%)
 delete mode 100755 t/suffix-rules-reject.sh

diff --git a/NG-NEWS b/NG-NEWS
index 209d779..d8cf72c 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -166,18 +166,6 @@ Parallel testsuite harness
   for suffix-less tests).
 
 
-Pattern rules and suffix rules
-==============================
-
-* Old-fashioned suffix rules are not supported anymore; Automake-NG will
-  error out if you try to use them.  Use pattern rules instead, as
-  advised in the GNU make manual itself.
-
-* The .SUFFIXES: special target and the SUFFIXES special variable are
-  not supported anymore either; Automake-NG will error out if you try
-  to define them.
-
-
 Distribution
 ============
 
diff --git a/automake.in b/automake.in
index 60ebc66..eaf00a7 100644
--- a/automake.in
+++ b/automake.in
@@ -4195,12 +4195,9 @@ sub handle_gettext
 # Handle footer elements.
 sub handle_footer
 {
-  # Automake used to have special support for old-fashioned suffix
-  # rules, but Automake-NG favors the use of GNU make pattern rules.
-  reject_rule '.SUFFIXES',
-              "use pattern rules, not old-fashioned suffix rules";
-  reject_var  'SUFFIXES',
-              "use pattern rules, not old-fashioned suffix rules";
+  # FIXME: maybe display a warning if the obsolescent $(SUFFIXES)
+  # FIXME: variable is used?  Currently, we don't do that, to preserve
+  # FIXME: better compatibility with mainline Automake.
   $output_trailer .= file_contents ('footer', new Automake::Location);
 }
 
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index 86b3b3d..7216d2c 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -10334,12 +10334,6 @@ doit_SOURCES = doit.foo
 
 Note that the above only works with suffixes that start with a dot.
 
-Also note that Automake-NG does not support old-fashioned suffix rules
-(@pxref{Suffix Rules, ,Old-fashioned Suffix Rules, make, The GNU make
-Manual}), since they are obsoleted by the GNU make pattern rules.  In
-fact, Automake-NG will error out an any attempt to use old-fashioned
-suffix rules.
-
 @node Include
 @chapter Include
 
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index d6c73e7..e49e382 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -625,16 +625,6 @@ sub define ($$$$$;$)
       $rule->set ($c, $def);
     }
 
-  my $chars_rx = '[a-zA-Z0-9_()address@hidden';
-  my $suffix_rule_rx = "^(\\.$chars_rx+)(\\.$chars_rx+)(?:\\s|\$)";
-
-  # We don't support old-fashioned  suffix rules anymore, but want to
-  # report them as errors.
-  if ($target =~ /$suffix_rule_rx/o)
-    {
-      error $where, "use pattern rules, not old-fashioned suffix rules";
-    }
-
   return @conds;
 }
 
diff --git a/lib/am/footer.am b/lib/am/footer.am
index 691b0c4..3a758f5 100644
--- a/lib/am/footer.am
+++ b/lib/am/footer.am
@@ -14,8 +14,8 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Neutralize the default suffix rules.
-.SUFFIXES:
+# For better compatibility with mainline Automake.
+$(if $(SUFFIXES),$(eval .SUFFIXES: $$(SUFFIXES)))
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/lib/missing b/lib/missing
index b4eb97f..6b4153e 100755
--- a/lib/missing
+++ b/lib/missing
@@ -33,13 +33,7 @@ run=:
 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
+configure_ac=configure.ac
 
 msg="missing on your system"
 
diff --git a/t/dist-included-parent-dir.sh b/t/suffix-rules-old-fashioned.sh
similarity index 53%
copy from t/dist-included-parent-dir.sh
copy to t/suffix-rules-old-fashioned.sh
index ae135ae..8de64ce 100755
--- a/t/dist-included-parent-dir.sh
+++ b/t/suffix-rules-old-fashioned.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# 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
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure included files in parent directory are distributed.
+# Automake-NG still accepts old-fashioned suffix rules.
 
 . ./defs || Exit 1
 
@@ -25,25 +25,48 @@ END
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
-test: distdir
-       test -f $(distdir)/foo
-       test -f $(distdir)/bar
-       test 2 -gt `find $(distdir)/sub -type d | wc -l`
+foobar: ; cp $< $@
+.mu.um:
+       cp $< $@
+.SUFFIXES: foo bar .mu .um
+data_DATA = xbar question.um
 END
 
-: > foo
-: > bar
-
 mkdir sub
 cat > sub/Makefile.am << 'END'
-include $(top_srcdir)/foo
-include ../bar
+SUFFIXES = .1 2 .3 4
+.1.3 24:
+       sed 's/@/O/' $< >$@
+all-local: bar.3 bar4
 END
 
 $ACLOCAL
-$AUTOCONF
 $AUTOMAKE
-# Use --srcdir with an absolute path because it's harder
-# to support in 'distdir'.
-./configure --srcdir "`pwd`"
-$MAKE test
+
+grep SUFFIXES Makefile.in sub/Makefile.in # For debugging.
+
+$AUTOCONF
+echo foofoofoo > xfoo
+echo 'What is the sound of one hand?' > question.mu
+echo '@NE' > sub/bar.1
+echo 'TW@' > sub/bar2
+
+mkdir build
+cd build
+../configure
+$MAKE
+diff ../xfoo xbar
+diff ../question.mu question.um
+test "$(cat sub/bar.3)" = ONE
+test "$(cat sub/bar4)" = TWO
+
+cd ..
+./configure
+$MAKE
+
+diff xfoo xbar
+diff question.mu question.um
+test "$(cat sub/bar.3)" = ONE
+test "$(cat sub/bar4)" = TWO
+
+:
diff --git a/t/suffix-rules-reject.sh b/t/suffix-rules-reject.sh
deleted file mode 100755
index a4d6aef..0000000
--- a/t/suffix-rules-reject.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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-NG should reject suffix rules in favor of pattern rules.
-
-. ./defs || Exit 1
-
-$ACLOCAL
-
-cat > Makefile.am << 'END'
-.SUFFIXES: .w
-END
-
-cat > Makefile2.am <<'END'
-## Dummy comments ...
-## ... whose only purpose is ...
-## ... to alter ...
-## ... the line count.
-SUFFIXES = .w
-END
-
-cat > Makefile3.am << 'END'
-.foo.bar: ; cp $< $@
-.mu.um:
-       cp $< $@
-.1.2 .3.4:
-       who cares
-END
-
-msg='use pattern rules, not old-fashioned suffix rules'
-
-AUTOMAKE_fails -Wno-error -Wnone Makefile
-grep "^Makefile\\.am:1:.*$msg" stderr
-AUTOMAKE_fails -Wno-error -Wnone Makefile2
-grep "^Makefile2\\.am:5:.*$msg" stderr
-AUTOMAKE_fails -Wno-error -Wnone Makefile3
-grep "^Makefile3\\.am:1:.*$msg" stderr
-grep "^Makefile3\\.am:2:.*$msg" stderr
-grep "^Makefile3\\.am:4:.*$msg" stderr
-test `grep -c "$msg" stderr` -eq 3
-
-:


hooks/post-receive
-- 
GNU Automake



reply via email to

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