diff --git a/ChangeLog b/ChangeLog index b8fd59a9..8c3b4b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-08-31 Akim Demaille + + * 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 * lib/Autom4te/General.pm ($version, $help, &getopt): New. diff --git a/bin/autoheader.in b/bin/autoheader.in index f7fe1be8..69253261 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -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 . 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; diff --git a/bin/autom4te.in b/bin/autom4te.in index 34d78622..44c9e71c 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -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;