]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/ifnames.in: Rewrite in Perl.
authorAkim Demaille <akim@epita.fr>
Thu, 13 Sep 2001 06:54:35 +0000 (06:54 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 13 Sep 2001 06:54:35 +0000 (06:54 +0000)
* configure.ac: Don't look for AWK.
* tests/tools.at (AWK portability): Remove.
(Syntax of the shell scripts): Don't check ifnames.
(AT_CHECK_PERL_SYNTAX): New.
(Syntax of the Perl scripts): Check ifnames.
* tests/ifnames: New.

25 files changed:
ChangeLog
Makefile.in
TODO
bin/Makefile.in
bin/autom4te.in
bin/ifnames.in
config/Makefile.in
configure
configure.ac
doc/Makefile.in
lib/Autom4te/Makefile.in
lib/Makefile.in
lib/autoconf/Makefile.in
lib/autoscan/Makefile.in
lib/autotest/Makefile.in
lib/m4sugar/Makefile.in
m4/Makefile.in
man/Makefile.in
man/autoconf.1
man/autoreconf.1
man/ifnames.1
tests/Makefile.am
tests/Makefile.in
tests/ifnames [new file with mode: 0755]
tests/tools.at

index 9e6afbd58c02c10964ea02b0ddb482c28f476004..bac1858c007511c185c4f4f7bd2f205652a6f9cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-09-13  Akim Demaille  <akim@epita.fr>
+
+       * bin/ifnames.in: Rewrite in Perl.
+       * configure.ac: Don't look for AWK.
+       * tests/tools.at (AWK portability): Remove.
+       (Syntax of the shell scripts): Don't check ifnames.
+       (AT_CHECK_PERL_SYNTAX): New.
+       (Syntax of the Perl scripts): Check ifnames.
+       * tests/ifnames: New.
+
 2001-09-13  Akim Demaille  <akim@epita.fr>
 
        * lib/autotest/general.m4 (AT_INIT): Let --keywords also match
index bb5b658838a7410f83ee078b9e799d8e9f29d85c..c6a50c913fe055f0bbc323d461f8d9982e0f9952 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
diff --git a/TODO b/TODO
index 77f71942e67dfe964eea0663c548dd032f74779f..2719297732f5d6017a61483bc43946829d02ecb9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -20,10 +20,6 @@ should be removed.
 ** AC_CHECK_TOOL...
 Write a test that checks that it honors the values set by the user.
 
-** ifnames
-Rewrite in Perl.  Drop the AWK dependency.  Remove the AWK portability
-tests.  Add ifnames to the Perl sanity checks.
-
 ** autom4te and warnings.
 Decide what must be done.
 
index 93c6ac1a4d2eb4483dd768d9358a68ed694db093..48e95c29e670baf477bf28956772481d3ef6d5b9 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index f1e8d7e6aef6f2028800f2ad9382cca927eeb3a3..2859551216a702d9ce63162f3ffd050743d2a8c8 100644 (file)
@@ -26,9 +26,7 @@ eval 'exec @PERL@ -S $0 ${1+"$@"}'
 
 BEGIN
 {
-  my $datadir = ($ENV{'autom4te_perllibdir'}
-                || $ENV{'AC_MACRODIR'}
-                || '@datadir@');
+  my $datadir = ($ENV{'autom4te_perllibdir'} || '@datadir@');
   unshift @INC, "$datadir";
 }
 
index 5bacefe7d0ac53232835866f26953a7d671d38c4..e2650843d737f351643f8263de2d595585d04ddc 100644 (file)
@@ -1,7 +1,12 @@
-#! @SHELL@
-# -*- shell-script -*-
+#! @PERL@ -w
+# -*- perl -*-
+# @configure_input@
+
+eval 'exec @PERL@ -S $0 ${1+"$@"}'
+    if 0;
+
 # ifnames - print the identifiers used in C preprocessor conditionals
-# Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1999, 2000, 2001 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
 # Written by David MacKenzie <djm@gnu.ai.mit.edu>
 # and Paul Eggert <eggert@twinsun.com>.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+BEGIN
+{
+  my $datadir = ($ENV{'autom4te_perllibdir'} || '@datadir@');
+  unshift @INC, "$datadir";
+}
 
-usage="\
-Usage: $0 [OPTION] ...  [FILE] ...
+use Autom4te::General;
+use Autom4te::XFile;
+
+# $HELP
+# -----
+$help = "Usage: $0 [OPTION] ...  [FILE] ...
 
 Scan all of the C source FILES (or the standard input, if none are
 given) and write to the standard output a sorted list of all the
-identifiers that appear in those files in \`#if', \`#elif', \`#ifdef', or
-\`#ifndef' directives.  Print each identifier on a line, followed by a
+identifiers that appear in those files in `#if', `#elif', `#ifdef', or
+`#ifndef' directives.  Print each identifier on a line, followed by a
 space-separated list of the files in which that identifier occurs.
 
   -h, --help      print this help, then exit
   -V, --version   print version number, then exit
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <bug-autoconf\@gnu.org>.";
+
 
-version="\
+# $VERSION
+# --------
+$version = "\
 ifnames (@PACKAGE_NAME@) @VERSION@
 Written by David J. MacKenzie and Paul Eggert.
 
-Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
+Copyright 1994, 1995, 1999, 2000, 2001 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="\
-Try \`$me --help' for more information."
-
-while test $# -gt 0; do
-  case "$1" in
-  --help | -h )
-    echo "$usage"; exit 0 ;;
-  --version | -V )
-    echo "$version"; exit 0 ;;
-  --)     # Stop option processing.
-    shift; break ;;
-  -*)
-    exec >&2
-    echo "$me: invalid option $1"
-    echo "$help"
-    exit 1 ;;
-  *) break ;;
-  esac
-done
-
-# Variables.
-: ${AWK=@AWK@}
-
-$AWK '
-  # Record that sym was found in FILENAME.
-  function file_sym(sym,  i, fs)
-  {
-    if (sym ~ /^[A-Za-z_]/)
-    {
-      if (!found[sym,FILENAME])
-      {
-       found[sym,FILENAME] = 1
-
-       # Insert FILENAME into files[sym], keeping the list sorted.
-       i = 1
-       fs = files[sym]
-       while (match(substr(fs, i), /^ [^ ]*/) \
-              && substr(fs, i + 1, RLENGTH - 1) < FILENAME)
-        {
-         i += RLENGTH
-       }
-       files[sym] = substr(fs, 1, i - 1) " " FILENAME substr(fs, i)
-      }
-    }
-  }
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.";
 
-  {
-    while (sub(/\\$/, "", $0) > 0)
-    {
-      if ((getline tmp) > 0)
-       $0 = $0 tmp
-      else
-       break
-    }
-  }
 
-  /^[\t ]*#/ {
-    if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
-    {
-      sub(/[^A-Za-z_0-9].*/, "", $0)
-      file_sym($0)
-    }
-    if (sub(/^[\t ]*#[\t ]*(el)?if[\t ]+/, "", $0))
+# &parse_args ()
+# --------------
+# Process any command line arguments.
+sub parse_args ()
+{
+  getopt ();
+}
+
+
+# %OCCURRENCE
+# -----------
+my %occurrence;
+
+
+# &scan_file ($FILENAME)
+# ----------------------
+sub scan_file ($)
+{
+  my ($filename) = @_;
+  my $file = new Autom4te::XFile ($filename);
+  while ($_ = $file->getline)
     {
-      # Remove comments.  Not perfect, but close enough.
-      gsub(/\/\*[^\/]*(\*\/)?/, "", $0)
-
-      for (i = split($0, field, /[^A-Za-z_0-9]+/);  1 <= i;  i--)
-      {
-       if (field[i] != "defined")
-        {
-         file_sym(field[i])
+      # Continuation lines.
+      $_ .= $file->getline
+       while (s/\\$//);
+
+      # Preprocessor directives.
+      if (s/^\s*\#\s*(if|ifdef|ifndef|elif)\s+//)
+       {
+         # Remove comments.  Not perfect, but close enough.
+         s(/\*.*?\*/)();
+         s(/\*.*)();
+         foreach my $word (split (/\W+/))
+           {
+             next
+               if $word eq 'defined' || $word !~ /^[a-zA-Z_]/;
+             $occurrence{$word}{$filename} = 1;
+           }
        }
-      }
     }
-  }
+}
 
-  END {
-    for (sym in files)
-    {
-      print sym files[sym]
-    }
+
+## ------ ##
+## Main.  ##
+## ------ ##
+
+parse_args();
+foreach (@ARGV)
+  {
+    scan_file ($_);
+  }
+foreach (sort keys %occurrence)
+  {
+    print "$_ ", join (' ', sort keys %{$occurrence{$_}}), "\n";
   }
-' ${1+"$@"} | sort
index 5735f40c35db50cafa78ede7b30f73da34b84675..3536dd9ab435300a62e198a01b8515d8a83cd2c1 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index 3176603b1d7510fe5d648c95315d95384133b862..b0371c5295797c6f2246e455d6db5bba4553f922 100755 (executable)
--- a/configure
+++ b/configure
@@ -1364,44 +1364,6 @@ fi
 # This is needed because Automake does not seem to realize there is
 # a AC-SUBST inside AC-PROG-GNU-M4.  Grmph!
 
-# `ifnames' uses AWK.
-for ac_prog in mawk gawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:1372: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_AWK="$ac_prog"
-echo "$as_me:1387: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  echo "$as_me:1395: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
-  echo "$as_me:1398: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$AWK" && break
-done
-
 # Generating man pages.
 
 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
@@ -1409,7 +1371,7 @@ HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
 # We use a path for perl so the #! line in autoscan will work.
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
-echo "$as_me:1412: checking for $ac_word" >&5
+echo "$as_me:1374: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PERL+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1426,7 +1388,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PERL="$ac_dir/$ac_word"
-   echo "$as_me:1429: found $ac_dir/$ac_word" >&5
+   echo "$as_me:1391: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -1438,20 +1400,20 @@ fi
 PERL=$ac_cv_path_PERL
 
 if test -n "$PERL"; then
-  echo "$as_me:1441: result: $PERL" >&5
+  echo "$as_me:1403: result: $PERL" >&5
 echo "${ECHO_T}$PERL" >&6
 else
-  echo "$as_me:1444: result: no" >&5
+  echo "$as_me:1406: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 if test "$PERL" = no; then
-  { { echo "$as_me:1449: error: perl is not found" >&5
+  { { echo "$as_me:1411: error: perl is not found" >&5
 echo "$as_me: error: perl is not found" >&2;}
    { (exit 1); exit 1; }; }
 fi
 $PERL -e 'require 5.005;' || {
-   { { echo "$as_me:1454: error: Perl 5.005 or better is required" >&5
+   { { echo "$as_me:1416: error: Perl 5.005 or better is required" >&5
 echo "$as_me: error: Perl 5.005 or better is required" >&2;}
    { (exit 1); exit 1; }; }
 }
@@ -1570,7 +1532,7 @@ rm -f confdef2opt.sed
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:1573: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:1535: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -1768,7 +1730,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:1771: error: ambiguous option: $1
+    { { echo "$as_me:1733: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -1787,7 +1749,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:1790: error: unrecognized option: $1
+  -*) { { echo "$as_me:1752: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -1839,7 +1801,7 @@ do
   "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
   "tests/atconfig" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
-  *) { { echo "$as_me:1842: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:1804: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -2027,7 +1989,7 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
       as_incr_dir=$as_incr_dir/$as_mkdir_dir
       test -d "$as_incr_dir" ||
         mkdir "$as_incr_dir" ||
-       { { echo "$as_me:2030: error: cannot create \"$ac_dir\"" >&5
+       { { echo "$as_me:1992: error: cannot create \"$ac_dir\"" >&5
 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
    { (exit 1); exit 1; }; }
     ;;
@@ -2064,7 +2026,7 @@ esac
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:2067: creating $ac_file" >&5
+    { echo "$as_me:2029: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -2082,7 +2044,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:2085: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:2047: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -2095,7 +2057,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:2098: error: cannot find input file: $f" >&5
+           { { echo "$as_me:2060: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -2167,7 +2129,7 @@ case $srcdir in
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
 
-  { echo "$as_me:2170: executing $ac_dest commands" >&5
+  { echo "$as_me:2132: executing $ac_dest commands" >&5
 echo "$as_me: executing $ac_dest commands" >&6;}
   case $ac_dest in
     tests/atconfig ) # Do not use _ACEOF as we are being dumped into config.status via
index 7290884de0b955812703bdde9fc2c5791f373cbd..5b490812252da9a7f4c776f9af196013a5fa79be 100644 (file)
@@ -45,9 +45,6 @@ fi
 # a AC-SUBST inside AC-PROG-GNU-M4.  Grmph!
 AC_SUBST(M4)
 
-# `ifnames' uses AWK.
-AC_PROG_AWK
-
 # Generating man pages.
 AM_MISSING_PROG(HELP2MAN, help2man)
 
index 90beab821d89c7137758c26bd2c1ae00b4fe522e..4f432521cbbfbf54d32e6767b4b822e30ddef0a4 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index 6f31db9e84fbaf1b820b46c145c0ae7d08ea68d1..4bf01bc8dbbd8200dd412e67afcd6490e4d2051a 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index 0756481b53e7a2dee20c18a98e02d9f3032cde9e..07cffe4c47228a2e9141dff6112cba9aec4ab79d 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index d767990557ce18592259584962838761fc9e3935..52bff4aa599acb542fdcab998e09c5af59a843a7 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index b3d2a02812d9f4782dca3c4b3f128ead35d943e9..65912b183706a84a5ed4361f54a1ea04333f65e8 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index cffcacfeb81b9dee4833600762bc9eb683b80359..ec21b066a2c1cc5f71392ca85d2405737acfce98 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index 8e2f70e27eeded952b0a78210b4f62d7c819491a..a6e629d6dc02652a4220020626d7cbf933558e33 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index fd6e3d9b08c7fc95c2f19cb6a53090ca5654a8c4..6ba273876c8dcee982092d8b92c7d2e933659dc6 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index 1b1be9fbc2e4b614fa4bb578bc091679302a8f6d..7fa3ba0b624395dd2323bd99ff6de417c936d512 100644 (file)
@@ -55,7 +55,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
index 436b08f6b7711983a3de40d1dafdfc36b53a02e6..13e5368a9d369b9112765c993f32bbc1a455d330 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.24.
-.TH AUTOCONF "1" "August 2001" "GNU Autoconf 2.52e" FSF
+.TH AUTOCONF "1" "September 2001" "GNU Autoconf 2.52e" FSF
 .SH NAME
 autoconf \- Generate configuration scripts
 .SH SYNOPSIS
index 88838ddb80f4185663b5f1379bb67ad0ffdf01b3..f37b660c59305264a3a6c359957c2ac760d25064 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.24.
-.TH AUTORECONF "1" "August 2001" "GNU Autoconf 2.52e" FSF
+.TH AUTORECONF "1" "September 2001" "GNU Autoconf 2.52e" FSF
 .SH NAME
 autoreconf \- Update generated configuration files
 .SH SYNOPSIS
index f8b7b2077379602ab9d761de9a88e731ca11ed39..bc39a92dc77e4d3a611a92a85b74036d3c870411 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.24.
-.TH IFNAMES "1" "August 2001" "GNU Autoconf 2.52e" FSF
+.TH IFNAMES "1" "September 2001" "ifnames " FSF
 .SH NAME
 ifnames \- Extract CPP conditionals from a set of files
 .SH SYNOPSIS
@@ -20,11 +20,13 @@ print version number, then exit
 .SH AUTHOR
 Written by David J. MacKenzie and Paul Eggert.
 .PP
-Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
+Copyright 1994, 1995, 1999, 2000, 2001 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 .SH "REPORTING BUGS"
 Report bugs to <bug-autoconf@gnu.org>.
+.PP
+ifnames (GNU Autoconf) 2.52e
 .SH "SEE ALSO"
 .BR autoconf (1),
 .BR automake (1),
index 654ef55d3353b6061196d5ec238c644b093def1b..d8ff64eddb66aea8fb8592683e53876f58c0a7e9 100644 (file)
@@ -24,7 +24,7 @@ EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
              atlocal.in
 
 # Running the uninstalled scripts.
-WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate
+WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
 
 DISTCLEANFILES       = atconfig atlocal $(TESTSUITE)
 
index ba2b4eabd707edc63280456aa68da81d758bc43b..aecebef725560452ff2fb7de80ef9376a0c07f06 100644 (file)
@@ -58,7 +58,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-AWK = @AWK@
 EXPR = @EXPR@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
@@ -72,7 +71,7 @@ EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
 
 
 # Running the uninstalled scripts.
-WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate
+WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
 
 DISTCLEANFILES = atconfig atlocal $(TESTSUITE)
 
@@ -127,7 +126,7 @@ subdir = tests
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_CLEAN_FILES =
 DIST_SOURCES =
-DIST_COMMON = README Makefile.am Makefile.in
+DIST_COMMON = README Makefile.am Makefile.in configure.ac
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/ifnames b/tests/ifnames
new file mode 100755 (executable)
index 0000000..0fce008
--- /dev/null
@@ -0,0 +1,14 @@
+#! /bin/sh
+# Running `ifnames' as if it were installed.
+
+. ./atconfig
+
+# Be sure to use the non installed Perl modules.
+# We need no special protection for the subtools (e.g., autoheader runs
+# autoconf which runs autom4te) because by themselves, they try to use
+# subtools from the same directory (i.e., foo/autoheader will run
+# foo/autoconf etc.).
+autom4te_perllibdir=$top_srcdir/lib
+export autom4te_perllibdir
+
+exec ../bin/ifnames ${1+"$@"}
index 0de403c73a90792f99dc4a9f54b5d6d05759e6d1..e71cba182c5a9d4ed5df843b9b453a3b0650bf35 100644 (file)
@@ -75,7 +75,6 @@ AT_CHECK([/bin/sh ./syntax.sh])
 
 AT_CHECK([/bin/sh -n ../bin/autoconf],   0)
 AT_CHECK([/bin/sh -n ../bin/autoreconf], 0)
-AT_CHECK([/bin/sh -n ../bin/ifnames],    0)
 
 # These are not built, they are in the src tree.
 AT_CHECK([/bin/sh -n $at_top_srcdir/config/install-sh], 0)
@@ -97,30 +96,15 @@ AT_SETUP([Syntax of the Perl scripts])
 # | % perl -c ./autom4te
 # | ./autom4te syntax OK
 # Ignore it, it might change between releases.
-AT_CHECK([autom4te_perllibdir=$top_srcdir/lib $PERL -c ../bin/autom4te],
-         0, [], [ignore])
-AT_CHECK([autom4te_perllibdir=$top_srcdir/lib $PERL -c ../bin/autoheader],
-         0, [], [ignore])
-AT_CHECK([autom4te_perllibdir=$top_srcdir/lib $PERL -c ../bin/autoscan],
-         0, [], [ignore])
-AT_CHECK([autom4te_perllibdir=$top_srcdir/lib $PERL -c ../bin/autoupdate],
-         0, [], [ignore])
+m4_define([AT_CHECK_PERL_SYNTAX],
+[AT_CHECK([autom4te_perllibdir=$top_srcdir/lib $PERL -c ../bin/$1],
+          0, [], [ignore])])
 
-AT_CLEANUP
-
-
-
-## ----------------- ##
-## AWK portability.  ##
-## ----------------- ##
-
-AT_SETUP([AWK portability])
-
-# Skip if we don't have GNU Awk.
-AT_CHECK([gawk --version || exit 77], 0, ignore, ignore)
-
-# Syntax correctness of ifnames.
-AT_CHECK([AWK='gawk --posix' ifnames /dev/null])
+AT_CHECK_PERL_SYNTAX([autoheader])
+AT_CHECK_PERL_SYNTAX([autom4te])
+AT_CHECK_PERL_SYNTAX([autoscan])
+AT_CHECK_PERL_SYNTAX([autoupdate])
+AT_CHECK_PERL_SYNTAX([ifnames])
 
 AT_CLEANUP
 
@@ -128,7 +112,6 @@ AT_CLEANUP
 
 
 
-
 ## ------------------ ##
 ## autoconf --trace.  ##
 ## ------------------ ##