mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-19 14:40:24 +08:00
* bin/autom4te.in (&parse_args): Die on unknown languages.
* bin/autoheader.in: Run directly autom4te --mode=autoconf, no need for autoconf. Promote --include over --macrodir and other obsolete options.
This commit is contained in:
parent
b7e99feee5
commit
1776c542d1
@ -1,3 +1,10 @@
|
||||
2001-08-31 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* bin/autom4te.in (&parse_args): Die on unknown languages.
|
||||
* bin/autoheader.in: Run directly autom4te --mode=autoconf, no
|
||||
need for autoconf.
|
||||
Promote --include over --macrodir and other obsolete options.
|
||||
|
||||
2001-08-31 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/Autom4te/General.pm ($version, $help, &getopt): New.
|
||||
|
@ -40,8 +40,7 @@ use strict;
|
||||
use vars qw ($config_h %verbatim %symbol);
|
||||
|
||||
# Lib files.
|
||||
my $autoconf_dir = $ENV{"AC_MACRODIR"} || "@datadir@";
|
||||
my $autoconf = $ENV{'AUTOCONF'} || '@autoconf-name@';
|
||||
my $autom4te = $ENV{'AUTOM4TE'} || '@autom4te-name@';
|
||||
local $config_h;
|
||||
my $config_h_in;
|
||||
my $localdir = '.';
|
||||
@ -66,6 +65,7 @@ or else \`configure.in\'.
|
||||
-V, --version print version number, then exit
|
||||
-v, --verbose verbosely report processing
|
||||
-d, --debug don\'t remove temporary files
|
||||
-I, --include=DIR look for input files in DIR. Accumulates
|
||||
-f, --force consider all the files are obsolete
|
||||
-W, --warnings=CATEGORY report the warnings falling in CATEGORY
|
||||
|
||||
@ -76,10 +76,6 @@ Warning categories include:
|
||||
\`none\' turn off all the warnings
|
||||
\`error\' warnings are error
|
||||
|
||||
Library directories:
|
||||
-A, --autoconf-dir=ACDIR Autoconf\'s macro files location (rarely needed)
|
||||
-l, --localdir=DIR location of \`aclocal.m4\' and \`acconfig.h\'
|
||||
|
||||
Report bugs to <bug-autoconf\@gnu.org>.
|
||||
END
|
||||
|
||||
@ -112,8 +108,7 @@ sub parse_args ()
|
||||
# If fixed some day, use this: '' => sub { push @ARGV, "-" }
|
||||
my $stdin = grep /^-$/, @ARGV;
|
||||
@ARGV = grep !/^-$/, @ARGV;
|
||||
getopt ('A|autoconf-dir|m|macrodir=s' => \$autoconf_dir,
|
||||
'l|localdir=s' => \$localdir,
|
||||
getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include,
|
||||
'f|force' => \$force,
|
||||
'W|warning' => \@warning);
|
||||
|
||||
@ -163,7 +158,8 @@ END
|
||||
}
|
||||
|
||||
# Set up autoconf.
|
||||
$autoconf .= " --include=$autoconf_dir --include=$localdir";
|
||||
my $autoconf = "$autom4te --language=autoconf ";
|
||||
$autoconf .= join (' ' , map { "--include=$_" } @include);
|
||||
$autoconf .= ' --debug' if $debug;
|
||||
$autoconf .= ' --force' if $force;
|
||||
$autoconf .= ' --verbose' if $verbose;
|
||||
|
@ -472,8 +472,13 @@ sub parse_args ()
|
||||
Getopt::Long::Configure ("pass_through");
|
||||
getopt ("s|language=s" => \$language);
|
||||
Getopt::Long::Configure ("defaults");
|
||||
unshift @ARGV, @{$language{$language}}
|
||||
if $language;
|
||||
|
||||
if ($language)
|
||||
{
|
||||
die "$me: unknown language: $language\n"
|
||||
unless exists $language{$language};
|
||||
unshift @ARGV, @{$language{$language}};
|
||||
}
|
||||
|
||||
verbose "arguments: @ARGV\n"
|
||||
if $debug;
|
||||
|
Loading…
x
Reference in New Issue
Block a user