From: Akim Demaille Date: Fri, 13 Sep 2002 07:03:28 +0000 (+0000) Subject: * aclocal.in: Prototype all the functions. X-Git-Tag: Release-1-6d~22 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=173c38ff6585fff3f71fcbe2a82e32bc212b534f;p=automake.git * aclocal.in: Prototype all the functions. Add `(C)' to Copyrights. (&add_file): Strip the comments before checking for `AC_REQUIRE'. Remove Perl 4 hacks, since anyway we require 5.005 via General.pm. --- diff --git a/ChangeLog b/ChangeLog index ed87e9cf..9d9a57c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-09-12 Akim Demaille + + * aclocal.in: Prototype all the functions. + Add `(C)' to Copyrights. + (&add_file): Strip the comments before checking for `AC_REQUIRE'. + Remove Perl 4 hacks, since anyway we require 5.005 via General.pm. + 2002-09-11 Akim Demaille * lib/am/texinfos.am (TEXI2PDF): Pass --batch to texi2dvi, since diff --git a/aclocal.in b/aclocal.in index 08966742..d8a4f69a 100644 --- a/aclocal.in +++ b/aclocal.in @@ -103,7 +103,7 @@ exit $exit_status; ################################################################ # Print usage and exit. -sub usage +sub usage ($) { local ($status) = @_; @@ -125,7 +125,7 @@ Report bugs to .\n"; } # Parse command line. -sub parse_arguments +sub parse_arguments (@) { local (@arglist) = @_; local (@dirlist); @@ -157,7 +157,7 @@ sub parse_arguments elsif ($arglist[0] eq '--version') { print "aclocal (GNU $PACKAGE) $VERSION\n\n"; - print "Copyright 2002 Free Software Foundation, Inc.\n"; + print "Copyright (C) 2002 Free Software Foundation, Inc.\n"; print "This is free software; see the source for copying conditions. There is NO\n"; print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"; print "Written by Tom Tromey \n"; @@ -220,7 +220,7 @@ sub parse_arguments ################################################################ -sub scan_configure +sub scan_configure () { die "aclocal: `configure.ac' or `configure.in' is required\n" if !$configure_ac; @@ -258,7 +258,7 @@ sub scan_configure ################################################################ # Check macros in acinclude.m4. If one is not used, warn. -sub check_acinclude +sub check_acinclude () { local ($key); @@ -276,7 +276,7 @@ sub check_acinclude ################################################################ # Scan all the installed m4 files and construct a map. -sub scan_m4_files +sub scan_m4_files (@) { local (@dirlist) = @_; @@ -325,7 +325,7 @@ sub scan_m4_files ################################################################ # Add a macro to the output. -sub add_macro +sub add_macro ($) { local ($macro) = @_; @@ -347,7 +347,7 @@ sub add_macro } # Add a file to output. -sub add_file +sub add_file ($) { local ($file) = @_; @@ -356,20 +356,18 @@ sub add_file $file_seen{$file} = 1; $output .= $file_contents{$file} . "\n"; - local ($a, @rlist); + my (@rlist); foreach (split ("\n", $file_contents{$file})) { - # This is a hack for Perl 4. - $a = $_; - if ($a =~ /$ac_require_rx/g) - { - push (@rlist, $1); - } - # Remove comments from current line. s/\bdnl\b.*$//; s/\#.*$//; + if (/$ac_require_rx/g) + { + push (@rlist, $1); + } + # The search function is constructed dynamically by # scan_m4_files. The last parenthethical match makes sure we # don't match things that look like macro assignments or @@ -390,7 +388,7 @@ sub add_file } # Scan a single M4 file. Return contents. -sub scan_file +sub scan_file ($) { local ($file) = @_; @@ -426,7 +424,7 @@ sub scan_file ################################################################ # Write output. -sub write_aclocal +sub write_aclocal () { return if ! length ($output); @@ -443,7 +441,7 @@ sub write_aclocal print $out "# generated automatically by aclocal $VERSION -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,