automake-patches
[Top][All Lists]
Advanced

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

aclocal too sensible to AC_REQUIRE in comments


From: Akim Demaille
Subject: aclocal too sensible to AC_REQUIRE in comments
Date: 13 Sep 2002 08:59:17 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * 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.

Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.73
diff -u -u -r1.73 aclocal.in
--- aclocal.in 1 Aug 2002 22:24:33 -0000 1.73
+++ aclocal.in 13 Sep 2002 07:02:40 -0000
@@ -103,7 +103,7 @@
 ################################################################
 
 # Print usage and exit.
-sub usage
+sub usage ($)
 {
     local ($status) = @_;
 
@@ -125,7 +125,7 @@
 }
 
 # Parse command line.
-sub parse_arguments
+sub parse_arguments (@)
 {
     local (@arglist) = @_;
     local (@dirlist);
@@ -157,7 +157,7 @@
        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 <address@hidden>\n";
@@ -220,7 +220,7 @@
 
 ################################################################
 
-sub scan_configure
+sub scan_configure ()
 {
     die "aclocal: `configure.ac' or `configure.in' is required\n"
         if !$configure_ac;
@@ -258,7 +258,7 @@
 ################################################################
 
 # Check macros in acinclude.m4.  If one is not used, warn.
-sub check_acinclude
+sub check_acinclude ()
 {
     local ($key);
 
@@ -276,7 +276,7 @@
 ################################################################
 
 # Scan all the installed m4 files and construct a map.
-sub scan_m4_files
+sub scan_m4_files (@)
 {
     local (@dirlist) = @_;
 
@@ -325,7 +325,7 @@
 ################################################################
 
 # Add a macro to the output.
-sub add_macro
+sub add_macro ($)
 {
     local ($macro) = @_;
 
@@ -347,7 +347,7 @@
 }
 
 # Add a file to output.
-sub add_file
+sub add_file ($)
 {
     local ($file) = @_;
 
@@ -356,20 +356,18 @@
     $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 @@
 }
 
 # Scan a single M4 file.  Return contents.
-sub scan_file
+sub scan_file ($)
 {
     local ($file) = @_;
 
@@ -426,7 +424,7 @@
 ################################################################
 
 # Write output.
-sub write_aclocal
+sub write_aclocal ()
 {
     return if ! length ($output);
 
@@ -443,7 +441,7 @@
     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,




reply via email to

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