Package: src:automake1.11
Version: 1:1.11.6-2
Tags: patch
Hi Eric,
aclocal 1.11 prints this warning with perl >= 5.16:
main::scan_file() called too early to check prototype at
/usr/bin/aclocal line 643.
This issue was reported and fixed upstream on automake 1.12.1 [1].
The attached patch is a trivial backport from that fix (changes:
s/spaces/tabs/
on THANKS, and quilt refresh to fix a minor fuzz 1 due to '^L' vs empty
line).
I couldn't find significant differences with the fix applied, on a
particular test
(below), but I would ask the maintainer(s) for a more general
opinion/evaluation,
given my shallow knowledge about the tool.
Thank you.
[1] https://lists.gnu.org/archive/html/bug-automake/2012-05/msg00034.html
--
Mauricio Faria de Oliveira
IBM Linux Technology Center
diff -Nru automake1.11-1.11.6/debian/changelog
automake1.11-1.11.6/debian/changelog
--- automake1.11-1.11.6/debian/changelog 2013-06-24 14:35:57.000000000
-0300
+++ automake1.11-1.11.6/debian/changelog 2014-06-25 15:32:49.000000000
-0300
@@ -1,3 +1,12 @@
+automake1.11 (1:1.11.6-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * debian/patches/04-aclocal-function-prototypes.patch: Fix for the warning
message
+ 'main::scan_file() called too early to check prototype at
/usr/bin/aclocal-1.11 line 643.'
+ with perl >= 5.16 (from automake 1.12.1).
+
+ -- Mauricio Faria de Oliveira <mauri...@linux.vnet.ibm.com> Wed, 25 Jun 2014
15:27:21 -0300
+
automake1.11 (1:1.11.6-2) unstable; urgency=low
* Reupload to unstable with binary package renamed to automake1.11.
diff -Nru
automake1.11-1.11.6/debian/patches/04-aclocal-function-prototypes.patch
automake1.11-1.11.6/debian/patches/04-aclocal-function-prototypes.patch
--- automake1.11-1.11.6/debian/patches/04-aclocal-function-prototypes.patch
1969-12-31 21:00:00.000000000 -0300
+++ automake1.11-1.11.6/debian/patches/04-aclocal-function-prototypes.patch
2014-06-25 15:36:22.000000000 -0300
@@ -0,0 +1,136 @@
+Origin: https://lists.gnu.org/archive/html/bug-automake/2012-05/msg00034.html
+>From 72ed7e00f847ce1ab3c8d460a5a4dcc06a3c560a Mon Sep 17 00:00:00 2001
+Message-Id:
<72ed7e00f847ce1ab3c8d460a5a4dcc06a3c560a.1338205618.git.stefano.lattar...@gmail.com>
+From: Stefano Lattarini <stefano.lattar...@gmail.com>
+Date: Mon, 28 May 2012 13:32:03 +0200
+Subject: [PATCH] aclocal: declare function prototypes, do not use '&' in
+ function calls
+
+This change will also fix automake bug#11543 (from a report by Matt
+Burgess).
+
+* aclocal.in: Declare prototypes for almost all functions early, before
+any actual function definition (but omit the prototype for the dynamically
+generated '&search' function). Add prototypes to any function definition.
+Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
+instead of "&func(ARGS...)").
+* THANKS: Update.
+
+Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
+---
+ THANKS | 1 +
+ aclocal.in | 42 ++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 35 insertions(+), 8 deletions(-)
+
+Index: automake1.11-1.11.6/THANKS
+===================================================================
+--- automake1.11-1.11.6.orig/THANKS
++++ automake1.11-1.11.6/THANKS
+@@ -231,6 +231,7 @@ Martin Waitz t...@admingilde.org
+ Mathias Doreille dorei...@smr.ch
+ Mathias Froehlich m.froehl...@science-computing.de
+ Mathias Hasselmann mathias.hasselm...@gmx.de
++Matt Burgess matt...@linuxfromscratch.org
+ Matt Leach mle...@cygnus.com
+ Matthew D. Langston langs...@slac.stanford.edu
+ Matthias Andree matthias.and...@gmx.de
+Index: automake1.11-1.11.6/aclocal.in
+===================================================================
+--- automake1.11-1.11.6.orig/aclocal.in
++++ automake1.11-1.11.6/aclocal.in
+@@ -152,8 +152,34 @@ my $erase_me;
+
+ ################################################################
+
++# Prototypes for all subroutines.
++
++sub unlink_tmp (;$);
++sub xmkdir_p ($);
++sub check_acinclude ();
++sub reset_maps ();
++sub install_file ($$);
++sub list_compare (\@\@);
++sub scan_m4_dirs ($@);
++sub scan_m4_files ();
++sub add_macro ($);
++sub scan_configure_dep ($);
++sub add_file ($);
++sub scan_file ($$$);
++sub strip_redundant_includes (%);
++sub trace_used_macros ();
++sub scan_configure ();
++sub write_aclocal ($@);
++sub usage ($);
++sub version ();
++sub handle_acdir_option ($$);
++sub parse_arguments ();
++sub parse_ACLOCAL_PATH ();
++
++################################################################
++
+ # Erase temporary file ERASE_ME. Handle signals.
+-sub unlink_tmp
++sub unlink_tmp (;$)
+ {
+ my ($sig) = @_;
+
+@@ -351,7 +377,7 @@ sub scan_m4_dirs ($@)
+ next if $file eq 'aclocal.m4';
+
+ my $fullfile = File::Spec->canonpath ("$m4dir/$file");
+- &scan_file ($type, $fullfile, 'aclocal');
++ scan_file ($type, $fullfile, 'aclocal');
+ }
+ closedir (DIR);
+ }
+@@ -362,12 +388,12 @@ sub scan_m4_files ()
+ {
+ # First, scan configure.ac. It may contain macro definitions,
+ # or may include other files that define macros.
+- &scan_file (FT_USER, $configure_ac, 'aclocal');
++ scan_file (FT_USER, $configure_ac, 'aclocal');
+
+ # Then, scan acinclude.m4 if it exists.
+ if (-f 'acinclude.m4')
+ {
+- &scan_file (FT_USER, 'acinclude.m4', 'aclocal');
++ scan_file (FT_USER, 'acinclude.m4', 'aclocal');
+ }
+
+ # Finally, scan all files in our search paths.
+@@ -381,7 +407,7 @@ sub scan_m4_files ()
+ my $search = "sub search {\nmy \$found = 0;\n";
+ foreach my $key (reverse sort keys %map)
+ {
+- $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key
++ $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { add_macro ("' . $key
+ . '"); $found = 1; }' . "\n");
+ }
+ $search .= "return \$found;\n};\n";
+@@ -404,7 +430,7 @@ sub add_macro ($)
+
+ verb "saw macro $macro";
+ $macro_seen{$macro} = 1;
+- &add_file ($map{$macro});
++ add_file ($map{$macro});
+ }
+
+ # scan_configure_dep ($file)
+@@ -466,7 +492,7 @@ sub scan_configure_dep ($)
+ }
+
+ add_macro ($_) foreach (@rlist);
+- &scan_configure_dep ($_) foreach @ilist;
++ scan_configure_dep ($_) foreach @ilist;
+ }
+
+ # add_file ($FILE)
+@@ -933,7 +959,7 @@ General help using GNU software: <http:/
+ }
+
+ # Print version and exit.
+-sub version()
++sub version ()
+ {
+ print <<EOF;
+ aclocal (GNU $PACKAGE) $VERSION
diff -Nru
automake1.11-1.11.6/debian/patches/aclocal-declare-function-prototypes-do-not-use-in-fu.patch
automake1.11-1.11.6/debian/patches/aclocal-declare-function-prototypes-do-not-use-in-fu.patch
---
automake1.11-1.11.6/debian/patches/aclocal-declare-function-prototypes-do-not-use-in-fu.patch
1969-12-31 21:00:00.000000000 -0300
+++
automake1.11-1.11.6/debian/patches/aclocal-declare-function-prototypes-do-not-use-in-fu.patch
2014-06-25 15:08:15.000000000 -0300
@@ -0,0 +1,135 @@
+>From 72ed7e00f847ce1ab3c8d460a5a4dcc06a3c560a Mon Sep 17 00:00:00 2001
+Message-Id:
<72ed7e00f847ce1ab3c8d460a5a4dcc06a3c560a.1338205618.git.stefano.lattar...@gmail.com>
+From: Stefano Lattarini <stefano.lattar...@gmail.com>
+Date: Mon, 28 May 2012 13:32:03 +0200
+Subject: [PATCH] aclocal: declare function prototypes, do not use '&' in
+ function calls
+
+This change will also fix automake bug#11543 (from a report by Matt
+Burgess).
+
+* aclocal.in: Declare prototypes for almost all functions early, before
+any actual function definition (but omit the prototype for the dynamically
+generated '&search' function). Add prototypes to any function definition.
+Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
+instead of "&func(ARGS...)").
+* THANKS: Update.
+
+Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
+---
+ THANKS | 1 +
+ aclocal.in | 42 ++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 35 insertions(+), 8 deletions(-)
+
+Index: automake1.11-1.11.6/THANKS
+===================================================================
+--- automake1.11-1.11.6.orig/THANKS
++++ automake1.11-1.11.6/THANKS
+@@ -231,6 +231,7 @@ Martin Waitz t...@admingilde.org
+ Mathias Doreille dorei...@smr.ch
+ Mathias Froehlich m.froehl...@science-computing.de
+ Mathias Hasselmann mathias.hasselm...@gmx.de
++Matt Burgess matt...@linuxfromscratch.org
+ Matt Leach mle...@cygnus.com
+ Matthew D. Langston langs...@slac.stanford.edu
+ Matthias Andree matthias.and...@gmx.de
+Index: automake1.11-1.11.6/aclocal.in
+===================================================================
+--- automake1.11-1.11.6.orig/aclocal.in
++++ automake1.11-1.11.6/aclocal.in
+@@ -152,8 +152,34 @@ my $erase_me;
+
+ ################################################################
+
++# Prototypes for all subroutines.
++
++sub unlink_tmp (;$);
++sub xmkdir_p ($);
++sub check_acinclude ();
++sub reset_maps ();
++sub install_file ($$);
++sub list_compare (\@\@);
++sub scan_m4_dirs ($@);
++sub scan_m4_files ();
++sub add_macro ($);
++sub scan_configure_dep ($);
++sub add_file ($);
++sub scan_file ($$$);
++sub strip_redundant_includes (%);
++sub trace_used_macros ();
++sub scan_configure ();
++sub write_aclocal ($@);
++sub usage ($);
++sub version ();
++sub handle_acdir_option ($$);
++sub parse_arguments ();
++sub parse_ACLOCAL_PATH ();
++
++################################################################
++
+ # Erase temporary file ERASE_ME. Handle signals.
+-sub unlink_tmp
++sub unlink_tmp (;$)
+ {
+ my ($sig) = @_;
+
+@@ -351,7 +377,7 @@ sub scan_m4_dirs ($@)
+ next if $file eq 'aclocal.m4';
+
+ my $fullfile = File::Spec->canonpath ("$m4dir/$file");
+- &scan_file ($type, $fullfile, 'aclocal');
++ scan_file ($type, $fullfile, 'aclocal');
+ }
+ closedir (DIR);
+ }
+@@ -362,12 +388,12 @@ sub scan_m4_files ()
+ {
+ # First, scan configure.ac. It may contain macro definitions,
+ # or may include other files that define macros.
+- &scan_file (FT_USER, $configure_ac, 'aclocal');
++ scan_file (FT_USER, $configure_ac, 'aclocal');
+
+ # Then, scan acinclude.m4 if it exists.
+ if (-f 'acinclude.m4')
+ {
+- &scan_file (FT_USER, 'acinclude.m4', 'aclocal');
++ scan_file (FT_USER, 'acinclude.m4', 'aclocal');
+ }
+
+ # Finally, scan all files in our search paths.
+@@ -381,7 +407,7 @@ sub scan_m4_files ()
+ my $search = "sub search {\nmy \$found = 0;\n";
+ foreach my $key (reverse sort keys %map)
+ {
+- $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key
++ $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { add_macro ("' . $key
+ . '"); $found = 1; }' . "\n");
+ }
+ $search .= "return \$found;\n};\n";
+@@ -404,7 +430,7 @@ sub add_macro ($)
+
+ verb "saw macro $macro";
+ $macro_seen{$macro} = 1;
+- &add_file ($map{$macro});
++ add_file ($map{$macro});
+ }
+
+ # scan_configure_dep ($file)
+@@ -466,7 +492,7 @@ sub scan_configure_dep ($)
+ }
+
+ add_macro ($_) foreach (@rlist);
+- &scan_configure_dep ($_) foreach @ilist;
++ scan_configure_dep ($_) foreach @ilist;
+ }
+
+ # add_file ($FILE)
+@@ -933,7 +959,7 @@ General help using GNU software: <http:/
+ }
+
+ # Print version and exit.
+-sub version()
++sub version ()
+ {
+ print <<EOF;
+ aclocal (GNU $PACKAGE) $VERSION
diff -Nru automake1.11-1.11.6/debian/patches/series
automake1.11-1.11.6/debian/patches/series
--- automake1.11-1.11.6/debian/patches/series 2013-06-24 14:35:57.000000000
-0300
+++ automake1.11-1.11.6/debian/patches/series 2014-06-25 15:36:20.000000000
-0300
@@ -1,3 +1,4 @@
01-texi-rename.diff
02-compile_f90_c_cxx-fix.diff
03-texinfo-fix-itemx.diff
+04-aclocal-function-prototypes.patch