[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autoscan.pl clean-up
From: |
Jim Meyering |
Subject: |
autoscan.pl clean-up |
Date: |
28 Jan 2001 15:11:01 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.96 |
Of these changes, only the backslash-quoting one is absolutely necessary.
* autoscan.pl (@kinds): Use `qw', rather than lots of quotes and commas.
(%generic_macro): Use single quotes around literals.
($configure_scan): Define global, and use it instead of the literal.
Use `warn' in place of `printf STDERR'.
(print_version): Backslash-escape the two leading `@' signs.
Index: autoscan.pl
===================================================================
RCS file: /cvs/autoconf/autoscan.pl,v
retrieving revision 1.38
diff -u -p -r1.38 autoscan.pl
--- autoscan.pl 2001/01/24 17:44:59 1.38
+++ autoscan.pl 2001/01/28 14:00:29
@@ -42,19 +42,19 @@ $verbose = 0;
%programs_macros = ();
%needed_macros = ();
-my @kinds =
- ('functions', 'headers', 'identifiers', 'programs', 'makevars');
+my @kinds = qw (functions headers identifiers programs makevars);
# For each kind, the default macro.
my %generic_macro =
(
- "functions" => "AC_CHECK_FUNCS",
- "headers" => "AC_CHECK_HEADERS",
- "identifiers" => "AC_CHECK_TYPES",
- "programs" => "AC_CHECK_PROGS"
+ 'functions' => 'AC_CHECK_FUNCS',
+ 'headers' => 'AC_CHECK_HEADERS',
+ 'identifiers' => 'AC_CHECK_TYPES',
+ 'programs' => 'AC_CHECK_PROGS'
);
+my $configure_scan = 'configure.scan';
&parse_args;
&init_tables;
@@ -66,8 +66,8 @@ if (-f 'configure.ac')
{
if (-f 'configure.in')
{
- print STDERR "warning: `configure.ac' and `configure.in' both
present.\n";
- print STDERR "warning: proceeding with `configure.ac'.\n";
+ warn "warning: `configure.ac' and `configure.in' both present.\n";
+ warn "warning: proceeding with `configure.ac'.\n";
}
&check_configure_ac ('configure.in');
}
@@ -110,7 +110,7 @@ sub print_usage
Examine source files in the directory tree rooted at SRCDIR, or the
current directory if none is given. Search the source files for
-common portability problems and create a file `configure.scan' which
+common portability problems and create a file `$configure_scan' which
is a preliminary `configure.ac' for that package.
-h, --help print this help, then exit
@@ -128,7 +128,7 @@ Report bugs to <address@hidden>.\
# Display version (--version).
sub print_version
{
- print "autoscan (@PACKAGE_NAME@) @VERSION@
+ print "autoscan (address@hidden@) address@hidden@
Written by David J. MacKenzie.
Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
@@ -158,8 +158,8 @@ Try `$me --help' for more information.\n
print "srcdir=$srcdir\n" if $verbose;
chdir $srcdir || die "$me: cannot cd to $srcdir: $!\n";
- open (CONF, ">configure.scan") ||
- die "$me: cannot create configure.scan: $!\n";
+ open (CONF, ">$configure_scan") ||
+ die "$me: cannot create $configure_scan: $!\n";
}
# Put values in the tables of what to do with each token.
@@ -467,7 +467,7 @@ sub output
print CONF "AC_OUTPUT\n";
close CONF ||
- die "$me: closing configure.scan: $!\n";
+ die "$me: closing $configure_scan: $!\n";
}
# Print Autoconf macro $1 if it's not undef and hasn't been printed already.
@@ -640,6 +640,6 @@ sub check_configure_ac
foreach $macro (sort keys %needed_macros)
{
- print STDERR "warning: missing $macro wanted by:
@{$needed_macros{$macro}}\n";
+ warn "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n";
}
}
- autoscan.pl clean-up,
Jim Meyering <=
- Re: autoscan.pl clean-up, Akim Demaille, 2001/01/29
- Re: autoscan.pl clean-up, Alexandre Oliva, 2001/01/29
- Re: autoscan.pl clean-up, Akim Demaille, 2001/01/29
- Re: autoscan.pl clean-up, Jim Meyering, 2001/01/29
- Re: autoscan.pl clean-up, Akim Demaille, 2001/01/29
- Re: autoscan.pl clean-up, Jim Meyering, 2001/01/29
- Re: autoscan.pl clean-up, Akim Demaille, 2001/01/29