mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-19 14:40:24 +08:00
* bin/autoconf.in (--include, -I): New option.
Map --localdir, --autoconf-dir onto it. Forward autom4te's options instead of interpreting them. * bin/autoconf.in, bin/autoheader.in (AC_MACRODIR, autoconf_dir): There is no such envvar since the inception of autom4te.cfg. * bin/autom4te.in (&parse_args): Uniquify `@include'. * bin/autoupdate.in: Adjust, and perform more control. * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Adjust. * tests/autoconf: Dittowise.
This commit is contained in:
parent
d19fa10fd6
commit
cd0e85de14
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2001-08-31 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* bin/autoconf.in (--include, -I): New option.
|
||||
Map --localdir, --autoconf-dir onto it.
|
||||
Forward autom4te's options instead of interpreting them.
|
||||
* bin/autoconf.in, bin/autoheader.in (AC_MACRODIR, autoconf_dir):
|
||||
There is no such envvar since the inception of autom4te.cfg.
|
||||
* bin/autom4te.in (&parse_args): Uniquify `@include'.
|
||||
* bin/autoupdate.in: Adjust, and perform more control.
|
||||
* tests/atspecific.m4 (AT_CHECK_AUTOCONF): Adjust.
|
||||
* tests/autoconf: Dittowise.
|
||||
|
||||
|
||||
2001-08-31 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* bin/autoconf.in: Don't bother with `acsite.m4' and `aclocal.m4'.
|
||||
|
@ -34,6 +34,7 @@ Operation modes:
|
||||
-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
|
||||
-o, --output=FILE save output in FILE (stdout is the default)
|
||||
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
|
||||
@ -49,10 +50,6 @@ Warning categories include:
|
||||
|
||||
The environment variable \`WARNINGS' is honored.
|
||||
|
||||
Library directories:
|
||||
-A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed)
|
||||
-l, --localdir=DIR location of the \`aclocal.m4' file
|
||||
|
||||
Tracing:
|
||||
-t, --trace=MACRO report the list of calls to MACRO
|
||||
-i, --initialization also trace Autoconf's initialization process
|
||||
@ -85,21 +82,15 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
|
||||
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
|
||||
|
||||
# Variables.
|
||||
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
|
||||
: ${AUTOM4TE=@autom4te-name@}
|
||||
debug=false
|
||||
force=false
|
||||
dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
|
||||
# Trace Autoconf's initialization?
|
||||
initialization=false
|
||||
localdir=.
|
||||
outfile=
|
||||
# Exit status.
|
||||
status=0
|
||||
verbose=:
|
||||
|
||||
# Parse command line.
|
||||
while test $# -gt 0 ; do
|
||||
option=`expr "x$1" : 'x\(--[^=]*\)' \| \
|
||||
"x$1" : 'x\(-.\)'`
|
||||
optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
|
||||
"x$1" : 'x-.\(.*\)'`
|
||||
case $1 in
|
||||
@ -108,40 +99,34 @@ while test $# -gt 0 ; do
|
||||
--help | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
|
||||
--debug | -d )
|
||||
debug=:; shift ;;
|
||||
--force | -f )
|
||||
force=:; shift ;;
|
||||
--verbose | -v )
|
||||
verbose=echo
|
||||
shift;;
|
||||
AUTOM4TE="$AUTOM4TE $1"; shift ;;
|
||||
|
||||
--localdir=* | -l?* )
|
||||
localdir=$optarg
|
||||
shift ;;
|
||||
--localdir | -l )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
localdir=$1
|
||||
shift ;;
|
||||
# Arguments passed as is to autom4te.
|
||||
--debug | -d | \
|
||||
--force | -f | \
|
||||
--include=* | -I?* | \
|
||||
--warnings=* | -W?* )
|
||||
AUTOM4TE="$AUTOM4TE $1"; shift ;;
|
||||
|
||||
--autoconf-dir=* | -A?* )
|
||||
autoconf_dir=$optarg
|
||||
# Options with separated arg passed as is to autom4te.
|
||||
--include | -I | \
|
||||
--warnings | -W )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
AUTOM4TE="$AUTOM4TE $option $2"
|
||||
shift 2 ;;
|
||||
|
||||
# Obsolete options.
|
||||
--localdir=* | -l?* | --autoconf-dir=* | -A?* | --macrodir=* | -m?* )
|
||||
echo "$me: warning: $option is obsolete, use --include" >&2
|
||||
AUTOM4TE="$AUTOM4TE --include=$optarg"
|
||||
shift ;;
|
||||
--autoconf-dir | -A )
|
||||
--localdir | -l | --autoconf-dir | -A | --macrodir | -m )
|
||||
echo "$me: warning: $option is obsolete, use --include" >&2
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
autoconf_dir=$1
|
||||
shift ;;
|
||||
--macrodir=* | -m?* )
|
||||
echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&2
|
||||
autoconf_dir=$optarg
|
||||
shift ;;
|
||||
--macrodir | -m )
|
||||
echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&2
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
autoconf_dir=$1
|
||||
AUTOM4TE="$AUTOM4TE --include=$1"
|
||||
shift ;;
|
||||
|
||||
--trace=* | -t?* )
|
||||
@ -153,7 +138,7 @@ while test $# -gt 0 ; do
|
||||
traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'"
|
||||
shift ;;
|
||||
--initialization | -i )
|
||||
initialization=:
|
||||
AUTOM4TE="$AUTOM4TE --melt"
|
||||
shift;;
|
||||
|
||||
--output=* | -o?* )
|
||||
@ -165,15 +150,6 @@ while test $# -gt 0 ; do
|
||||
outfile=$1
|
||||
shift ;;
|
||||
|
||||
--warnings=* | -W?* )
|
||||
warnings=$warnings,$optarg
|
||||
shift ;;
|
||||
--warnings | -W )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
warnings=$warnings,$1
|
||||
shift ;;
|
||||
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
@ -215,22 +191,9 @@ esac
|
||||
test -z "$outfile" && outfile=-
|
||||
|
||||
# Running autom4te.
|
||||
run_autom4te="$AUTOM4TE "\
|
||||
`$verbose "--verbose "`\
|
||||
`$debug && echo "--debug "`\
|
||||
`$force && echo "--force "`\
|
||||
"--language=autoconf "\
|
||||
"--include=$autoconf_dir "\
|
||||
"--include=$localdir "\
|
||||
`test -n "$warnings" && echo "--warning=$warnings "`\
|
||||
"--output=$outfile "\
|
||||
`$initialization && echo "--melt "`
|
||||
|
||||
run_autom4te="$AUTOM4TE --language=autoconf --output=$outfile"
|
||||
# Autom4te expansion.
|
||||
eval set dummy "$traces"
|
||||
shift
|
||||
$verbose "$me: running $run_autom4te "${1+"$@"}" $infile" >&2
|
||||
$run_autom4te ${1+"$@"} $infile ||
|
||||
{ (exit 1); exit 1; }
|
||||
|
||||
(exit $status); exit $status
|
||||
exec $run_autom4te ${1+"$@"} $infile
|
||||
|
@ -78,7 +78,6 @@ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
|
||||
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
|
||||
|
||||
# Variables.
|
||||
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
|
||||
: ${AUTOCONF=@autoconf-name@}
|
||||
dir=`echo "$0" | sed -e 's,[^/]*$,,'`
|
||||
debug=false
|
||||
@ -253,7 +252,7 @@ case $# in
|
||||
esac
|
||||
|
||||
# Set up autoconf.
|
||||
autoconf="$AUTOCONF -A $autoconf_dir -l $localdir "\
|
||||
autoconf="$AUTOCONF --include=$autoconf_dir --include=$localdir "\
|
||||
`$verbose "--verbose "`\
|
||||
`$debug && echo "--debug "`
|
||||
|
||||
|
@ -573,6 +573,11 @@ sub parse_args ()
|
||||
Try `$me --help' for more information.\n"
|
||||
unless @ARGV;
|
||||
|
||||
# Normalize the includes: the first occurrence is enough, several is
|
||||
# a pain since it introduces a useless difference in the path which
|
||||
# invalidates the cache.
|
||||
@include = uniq (@include);
|
||||
|
||||
# Convert @trace to %trace, and work around the M4 builtins tracing
|
||||
# problem.
|
||||
# The default format is `$f:$l:$n:$%'.
|
||||
|
@ -135,7 +135,7 @@ sub parse_args ()
|
||||
## -------------- ##
|
||||
parse_args;
|
||||
mktmpdir ('au');
|
||||
$autoconf .= " --autoconf-dir $autoconf_dir --localdir $localdir ";
|
||||
$autoconf .= " --include=$autoconf_dir --include=$localdir ";
|
||||
$autoconf .= "--debug " if $debug;
|
||||
$autoconf .= "--verbose " if $verbose;
|
||||
|
||||
@ -176,17 +176,22 @@ my (%ac_macros, %au_macros);
|
||||
while (<MACROS>)
|
||||
{
|
||||
chomp;
|
||||
/^(AC|AU):(.*):([^:]*)$/ or next;
|
||||
my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next;
|
||||
# ../lib/m4sugar/m4sugar.m4 -> m4sugar
|
||||
# ../lib/autoconf/general.m4 -> autoconf
|
||||
my $set = basename (dirname ($2));
|
||||
if ($1 eq "AC")
|
||||
# aclocal.m4 -> ignore
|
||||
next
|
||||
if $file eq 'aclocal.m4';
|
||||
my $set = basename (dirname ($file));
|
||||
die "$me: unknown set: $set: $_\n"
|
||||
unless $set =~ /^(m4sugar|autoconf)$/;
|
||||
if ($domain eq "AC")
|
||||
{
|
||||
$ac_macros{$3} = $set;
|
||||
$ac_macros{$macro} = $set;
|
||||
}
|
||||
else
|
||||
{
|
||||
$au_macros{$3} = $set;
|
||||
$au_macros{$macro} = $set;
|
||||
}
|
||||
}
|
||||
close MACROS
|
||||
@ -202,6 +207,11 @@ if ($debug)
|
||||
print STDERR "Obsolete Autoconf macros:\n";
|
||||
print STDERR join (' ', sort keys %au_macros) . "\n\n";
|
||||
}
|
||||
die "$me: no current Autoconf macros found\n"
|
||||
unless keys %ac_macros;
|
||||
die "$me: no obsolete Autoconf macros found\n"
|
||||
unless keys %au_macros;
|
||||
|
||||
|
||||
# $au_changequote -- enable the quote `[', `]' right before any AU macro.
|
||||
my $au_changequote =
|
||||
@ -364,11 +374,11 @@ EOF
|
||||
# Now ask m4 to perform the update.
|
||||
if ("$file" eq "$tmp/stdin")
|
||||
{
|
||||
xsystem ("$m4 -I $autoconf_dir $tmp/input.m4");
|
||||
xsystem ("$m4 --include=$autoconf_dir $tmp/input.m4");
|
||||
}
|
||||
else
|
||||
{
|
||||
xsystem ("$m4 -I $autoconf_dir $tmp/input.m4 >$tmp/updated");
|
||||
xsystem ("$m4 --include=$autoconf_dir $tmp/input.m4 >$tmp/updated");
|
||||
if (compare ("$tmp/updated", "$file") == 0)
|
||||
{
|
||||
# File didn't change, so don't update its mod time.
|
||||
|
@ -24,6 +24,9 @@ verbosely report processing
|
||||
\fB\-d\fR, \fB\-\-debug\fR
|
||||
don't remove temporary files
|
||||
.TP
|
||||
\fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR
|
||||
look for input files in DIR. Accumulates
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-force\fR
|
||||
consider all the files are obsolete
|
||||
.TP
|
||||
@ -56,13 +59,6 @@ turn off all the warnings
|
||||
warnings are error
|
||||
.PP
|
||||
The environment variable `WARNINGS' is honored.
|
||||
.SS "Library directories:"
|
||||
.TP
|
||||
\fB\-A\fR, \fB\-\-autoconf\-dir\fR=\fIACDIR\fR
|
||||
Autoconf's macro files location (rarely needed)
|
||||
.TP
|
||||
\fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR
|
||||
location of the `aclocal.m4' file
|
||||
.SS "Tracing:"
|
||||
.TP
|
||||
\fB\-t\fR, \fB\-\-trace\fR=\fIMACRO\fR
|
||||
|
@ -65,7 +65,7 @@ AC_STATE_SAVE(after)
|
||||
# -----------------------------------------------------------
|
||||
m4_define([AT_CHECK_AUTOCONF],
|
||||
[AT_CLEANUP_FILES(configure.in configure autom4te.cache)dnl
|
||||
AT_CHECK([autoconf --localdir=$srcdir $1],
|
||||
AT_CHECK([autoconf --include=$srcdir $1],
|
||||
m4_default([$2], [0]), [$3], [$4])])
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Running `autoheader' as if it were installed.
|
||||
# Running `$0' as if it were installed.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*[\\/],,'`
|
||||
|
||||
. ./atconfig
|
||||
|
||||
exec ../bin/$me --autoconf-dir ../lib ${1+"$@"}
|
||||
exec ../bin/$me --include ../lib ${1+"$@"}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# Running `autoheader' as if it were installed.
|
||||
# Running `$0' as if it were installed.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*[\\/],,'`
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# Running `autoheader' as if it were installed.
|
||||
# Running `$0' as if it were installed.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*[\\/],,'`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user