summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2001-09-13 06:54:35 +0000
committerAkim Demaille <akim@epita.fr>2001-09-13 06:54:35 +0000
commitc737451f8c17afdb477ad0fe72f534ea837e001e (patch)
tree8f9d1eabd503e2efbac726cb277f2e1864f6d870
parentc77d29d43ddeabf19c829d31f435a608e2a20417 (diff)
downloadautoconf-c737451f8c17afdb477ad0fe72f534ea837e001e.tar.gz
* 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.
-rw-r--r--ChangeLog10
-rw-r--r--Makefile.in1
-rw-r--r--TODO4
-rw-r--r--bin/Makefile.in1
-rw-r--r--bin/autom4te.in4
-rw-r--r--bin/ifnames.in169
-rw-r--r--config/Makefile.in1
-rwxr-xr-xconfigure68
-rw-r--r--configure.ac3
-rw-r--r--doc/Makefile.in1
-rw-r--r--lib/Autom4te/Makefile.in1
-rw-r--r--lib/Makefile.in1
-rw-r--r--lib/autoconf/Makefile.in1
-rw-r--r--lib/autoscan/Makefile.in1
-rw-r--r--lib/autotest/Makefile.in1
-rw-r--r--lib/m4sugar/Makefile.in1
-rw-r--r--m4/Makefile.in1
-rw-r--r--man/Makefile.in1
-rw-r--r--man/autoconf.12
-rw-r--r--man/autoreconf.12
-rw-r--r--man/ifnames.16
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/Makefile.in5
-rwxr-xr-xtests/ifnames14
-rw-r--r--tests/tools.at33
25 files changed, 136 insertions, 198 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e6afbd5..bac1858c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
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
test group titles.
* tests/atspecific.m4 (AT_CHECK_AU_MACRO): AT_KEYWORDS(autoupdate).
diff --git a/Makefile.in b/Makefile.in
index bb5b6588..c6a50c91 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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 77f71942..27192977 100644
--- 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.
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 93c6ac1a..48e95c29 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/bin/autom4te.in b/bin/autom4te.in
index f1e8d7e6..28595512 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -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";
}
diff --git a/bin/ifnames.in b/bin/ifnames.in
index 5bacefe7..e2650843 100644
--- a/bin/ifnames.in
+++ b/bin/ifnames.in
@@ -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
@@ -24,111 +29,95 @@
# 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
diff --git a/config/Makefile.in b/config/Makefile.in
index 5735f40c..3536dd9a 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/configure b/configure
index 3176603b..b0371c52 100755
--- 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
diff --git a/configure.ac b/configure.ac
index 7290884d..5b490812 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 90beab82..4f432521 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/lib/Autom4te/Makefile.in b/lib/Autom4te/Makefile.in
index 6f31db9e..4bf01bc8 100644
--- a/lib/Autom4te/Makefile.in
+++ b/lib/Autom4te/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 0756481b..07cffe4c 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/lib/autoconf/Makefile.in b/lib/autoconf/Makefile.in
index d7679905..52bff4aa 100644
--- a/lib/autoconf/Makefile.in
+++ b/lib/autoconf/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/lib/autoscan/Makefile.in b/lib/autoscan/Makefile.in
index b3d2a028..65912b18 100644
--- a/lib/autoscan/Makefile.in
+++ b/lib/autoscan/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/lib/autotest/Makefile.in b/lib/autotest/Makefile.in
index cffcacfe..ec21b066 100644
--- a/lib/autotest/Makefile.in
+++ b/lib/autotest/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/lib/m4sugar/Makefile.in b/lib/m4sugar/Makefile.in
index 8e2f70e2..a6e629d6 100644
--- a/lib/m4sugar/Makefile.in
+++ b/lib/m4sugar/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/m4/Makefile.in b/m4/Makefile.in
index fd6e3d9b..6ba27387 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/man/Makefile.in b/man/Makefile.in
index 1b1be9fb..7fa3ba0b 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -55,7 +55,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-AWK = @AWK@
EXPR = @EXPR@
HELP2MAN = @HELP2MAN@
M4 = @M4@
diff --git a/man/autoconf.1 b/man/autoconf.1
index 436b08f6..13e5368a 100644
--- a/man/autoconf.1
+++ b/man/autoconf.1
@@ -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
diff --git a/man/autoreconf.1 b/man/autoreconf.1
index 88838ddb..f37b660c 100644
--- a/man/autoreconf.1
+++ b/man/autoreconf.1
@@ -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
diff --git a/man/ifnames.1 b/man/ifnames.1
index f8b7b207..bc39a92d 100644
--- a/man/ifnames.1
+++ b/man/ifnames.1
@@ -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),
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 654ef55d..d8ff64ed 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ba2b4eab..aecebef7 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -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
index 00000000..0fce008d
--- /dev/null
+++ b/tests/ifnames
@@ -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+"$@"}
diff --git a/tests/tools.at b/tests/tools.at
index 0de403c7..e71cba18 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -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. ##
## ------------------ ##