]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoscan.in: Formatting changes, matching the invocation order.
authorAkim Demaille <akim@epita.fr>
Tue, 3 Jul 2001 14:10:41 +0000 (14:10 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 3 Jul 2001 14:10:41 +0000 (14:10 +0000)
(File::Find): Use it instead of Perl 4's `find.pl'.
(&wanted): Rename as...
(&find_file): this.

ChangeLog
autoscan.in
bin/autoscan.in
man/autoscan.1

index fae5fd0642cd1f6dac4e28c23bb30b04d445a667..13d8cae15416c991d21edd51f6a80136aee229d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-02  Akim Demaille  <akim@epita.fr>
+
+       * autoscan.in: Formatting changes, matching the invocation order.
+       (File::Find): Use it instead of Perl 4's `find.pl'.
+       (&wanted): Rename as...
+       (&find_file): this.
+
 2001-06-29  Pavel Roskin  <proski@gnu.org>
 
        * aclang.m4 (AC_F77_DUMMY_MAIN): Remove conftest* after using
index 9493b4a0f24f375981955d42173bf689effdf4d6..ea9651c18f73e9e30715c712850e5754e699cab1 100644 (file)
 # Written by David MacKenzie <djm@gnu.ai.mit.edu>.
 
 use 5.005;
-require "find.pl";
 use File::Basename;
+use File::Find;
 use Getopt::Long;
 use strict;
 
-use vars qw($autoconf $datadir $initfile $name
+use vars qw($initfile
             @cfiles @makefiles @shfiles %c_keywords %printed);
 
 my $me = basename ($0);
@@ -64,6 +64,9 @@ my %kind_comment =
 
 my $configure_scan = 'configure.scan';
 
+# Autoconf and lib files.
+my $autoconf;
+my $datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
 
 # Exit nonzero whenever closing STDOUT fails.
 sub END
@@ -75,51 +78,6 @@ sub END
     or (warn "$me: closing standard output: $!\n"), _exit (1);
 }
 
-# find_autoconf
-# -------------
-# Find the lib files and autoconf.
-sub find_autoconf
-{
-  $datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
-  my $dir = dirname ($0);
-  $autoconf = '';
-  # We test "$dir/autoconf" in case we are in the build tree, in which case
-  # the names are not transformed yet.
-  foreach my $file ($ENV{"AUTOCONF"} || '',
-                   "$dir/@autoconf-name@",
-                   "$dir/autoconf",
-                   "@bindir@/@autoconf-name@")
-    {
-      if (-x $file)
-       {
-         $autoconf = $file;
-         last;
-       }
-    }
-}
-
-
-# $CONFIGURE_AC
-# &find_configure_ac ()
-# ---------------------
-sub find_configure_ac ()
-{
-  if (-f 'configure.ac')
-    {
-      if (-f 'configure.in')
-       {
-         warn "warning: `configure.ac' and `configure.in' both present.\n";
-         warn "warning: proceeding with `configure.ac'.\n";
-       }
-      return 'configure.ac';
-    }
-  elsif (-f 'configure.in')
-    {
-      return 'configure.in';
-    }
-  return;
-}
-
 
 # print_usage ()
 # --------------
@@ -186,6 +144,50 @@ Try `$me --help' for more information.\n"
 }
 
 
+# find_autoconf
+# -------------
+# Find the lib files and autoconf.
+sub find_autoconf
+{
+  my $dir = dirname ($0);
+  # We test "$dir/autoconf" in case we are in the build tree, in which case
+  # the names are not transformed yet.
+  foreach my $file ($ENV{"AUTOCONF"} || '',
+                   "$dir/@autoconf-name@",
+                   "$dir/autoconf",
+                   "@bindir@/@autoconf-name@")
+    {
+      if (-x $file)
+       {
+         $autoconf = $file;
+         last;
+       }
+    }
+}
+
+
+# $CONFIGURE_AC
+# &find_configure_ac ()
+# ---------------------
+sub find_configure_ac ()
+{
+  if (-f 'configure.ac')
+    {
+      if (-f 'configure.in')
+       {
+         warn "warning: `configure.ac' and `configure.in' both present.\n";
+         warn "warning: proceeding with `configure.ac'.\n";
+       }
+      return 'configure.ac';
+    }
+  elsif (-f 'configure.in')
+    {
+      return 'configure.in';
+    }
+  return;
+}
+
+
 # init_tables ()
 # --------------
 # Put values in the tables of what to do with each token.
@@ -246,34 +248,34 @@ sub init_tables ()
 }
 
 
-# wanted ()
-# ---------
+# find_files ()
+# -------------
 # Collect names of various kinds of files in the package.
 # Called by &find on each file.
-sub wanted ()
+sub find_files ()
 {
   # Strip a useless leading `./'.
-  $name =~ s,^\./,,;
+  $File::Find::name =~ s,^\./,,;
 
   if (/^.*\.[chlymC]$/ || /^.*\.cc$/)
     {
-      push (@cfiles, $name);
+      push (@cfiles, $File::Find::name);
     }
   elsif (/^[Mm]akefile$/ || /^GNUmakefile$/)
     {
       # Wanted only if there is no corresponding Makefile.in.
       # Using Find, $_ contains the current filename with the current
       # directory of the walk through.
-      push (@makefiles, $name)
+      push (@makefiles, $File::Find::name)
        if ! -f "$_.in";
     }
   elsif (/^[Mm]akefile\.in$/)
     {
-      push (@makefiles, $name);
+      push (@makefiles, $File::Find::name);
     }
   elsif (/^.*\.sh$/)
     {
-      push (@shfiles, $name);
+      push (@shfiles, $File::Find::name);
     }
 }
 
@@ -602,12 +604,12 @@ sub check_configure_ac ($)
 ## Main program.  ##
 ## -------------- ##
 
+parse_args;
 # Find the lib files and autoconf.
 find_autoconf;
 my $configure_ac = find_configure_ac;
-parse_args;
 init_tables;
-find ('.');
+find (\&find_files, '.');
 scan_files;
 output ('configure.scan');
 if ($configure_ac)
index 9493b4a0f24f375981955d42173bf689effdf4d6..ea9651c18f73e9e30715c712850e5754e699cab1 100644 (file)
 # Written by David MacKenzie <djm@gnu.ai.mit.edu>.
 
 use 5.005;
-require "find.pl";
 use File::Basename;
+use File::Find;
 use Getopt::Long;
 use strict;
 
-use vars qw($autoconf $datadir $initfile $name
+use vars qw($initfile
             @cfiles @makefiles @shfiles %c_keywords %printed);
 
 my $me = basename ($0);
@@ -64,6 +64,9 @@ my %kind_comment =
 
 my $configure_scan = 'configure.scan';
 
+# Autoconf and lib files.
+my $autoconf;
+my $datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
 
 # Exit nonzero whenever closing STDOUT fails.
 sub END
@@ -75,51 +78,6 @@ sub END
     or (warn "$me: closing standard output: $!\n"), _exit (1);
 }
 
-# find_autoconf
-# -------------
-# Find the lib files and autoconf.
-sub find_autoconf
-{
-  $datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
-  my $dir = dirname ($0);
-  $autoconf = '';
-  # We test "$dir/autoconf" in case we are in the build tree, in which case
-  # the names are not transformed yet.
-  foreach my $file ($ENV{"AUTOCONF"} || '',
-                   "$dir/@autoconf-name@",
-                   "$dir/autoconf",
-                   "@bindir@/@autoconf-name@")
-    {
-      if (-x $file)
-       {
-         $autoconf = $file;
-         last;
-       }
-    }
-}
-
-
-# $CONFIGURE_AC
-# &find_configure_ac ()
-# ---------------------
-sub find_configure_ac ()
-{
-  if (-f 'configure.ac')
-    {
-      if (-f 'configure.in')
-       {
-         warn "warning: `configure.ac' and `configure.in' both present.\n";
-         warn "warning: proceeding with `configure.ac'.\n";
-       }
-      return 'configure.ac';
-    }
-  elsif (-f 'configure.in')
-    {
-      return 'configure.in';
-    }
-  return;
-}
-
 
 # print_usage ()
 # --------------
@@ -186,6 +144,50 @@ Try `$me --help' for more information.\n"
 }
 
 
+# find_autoconf
+# -------------
+# Find the lib files and autoconf.
+sub find_autoconf
+{
+  my $dir = dirname ($0);
+  # We test "$dir/autoconf" in case we are in the build tree, in which case
+  # the names are not transformed yet.
+  foreach my $file ($ENV{"AUTOCONF"} || '',
+                   "$dir/@autoconf-name@",
+                   "$dir/autoconf",
+                   "@bindir@/@autoconf-name@")
+    {
+      if (-x $file)
+       {
+         $autoconf = $file;
+         last;
+       }
+    }
+}
+
+
+# $CONFIGURE_AC
+# &find_configure_ac ()
+# ---------------------
+sub find_configure_ac ()
+{
+  if (-f 'configure.ac')
+    {
+      if (-f 'configure.in')
+       {
+         warn "warning: `configure.ac' and `configure.in' both present.\n";
+         warn "warning: proceeding with `configure.ac'.\n";
+       }
+      return 'configure.ac';
+    }
+  elsif (-f 'configure.in')
+    {
+      return 'configure.in';
+    }
+  return;
+}
+
+
 # init_tables ()
 # --------------
 # Put values in the tables of what to do with each token.
@@ -246,34 +248,34 @@ sub init_tables ()
 }
 
 
-# wanted ()
-# ---------
+# find_files ()
+# -------------
 # Collect names of various kinds of files in the package.
 # Called by &find on each file.
-sub wanted ()
+sub find_files ()
 {
   # Strip a useless leading `./'.
-  $name =~ s,^\./,,;
+  $File::Find::name =~ s,^\./,,;
 
   if (/^.*\.[chlymC]$/ || /^.*\.cc$/)
     {
-      push (@cfiles, $name);
+      push (@cfiles, $File::Find::name);
     }
   elsif (/^[Mm]akefile$/ || /^GNUmakefile$/)
     {
       # Wanted only if there is no corresponding Makefile.in.
       # Using Find, $_ contains the current filename with the current
       # directory of the walk through.
-      push (@makefiles, $name)
+      push (@makefiles, $File::Find::name)
        if ! -f "$_.in";
     }
   elsif (/^[Mm]akefile\.in$/)
     {
-      push (@makefiles, $name);
+      push (@makefiles, $File::Find::name);
     }
   elsif (/^.*\.sh$/)
     {
-      push (@shfiles, $name);
+      push (@shfiles, $File::Find::name);
     }
 }
 
@@ -602,12 +604,12 @@ sub check_configure_ac ($)
 ## Main program.  ##
 ## -------------- ##
 
+parse_args;
 # Find the lib files and autoconf.
 find_autoconf;
 my $configure_ac = find_configure_ac;
-parse_args;
 init_tables;
-find ('.');
+find (\&find_files, '.');
 scan_files;
 output ('configure.scan');
 if ($configure_ac)
index 2537ff125b8aa5e4e5a1bfd0c693ff20095caf00..c4a1e17c9220184b66a8ed72463be2c8904bf83a 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.24.
-.TH AUTOSCAN "1" "June 2001" "GNU Autoconf 2.50c" FSF
+.TH AUTOSCAN "1" "July 2001" "GNU Autoconf 2.50c" FSF
 .SH NAME
 autoscan \- Generate a preliminary configure.in
 .SH SYNOPSIS