[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Migrating to autoconf 2.52g
From: |
John Poltorak |
Subject: |
Re: Migrating to autoconf 2.52g |
Date: |
Mon, 4 Feb 2002 19:33:41 +0000 |
On Mon, Feb 04, 2002 at 11:22:48AM -0800, Paul Eggert wrote:
> > From: Tim Van Holder <address@hidden>
> > Date: 04 Feb 2002 13:32:34 +0100
> >
> > DEVNULL=/dev/null
> > test -f /dev/null || { test -f NUL && DEVNULL=NUL }
>
> That won't work, as /dev/null is not a regular file.
>
> Also, I wouldn't bother with this sort of porting. I would just fix
> my build environment so that /dev/null works correctly.
I think the error msg is just a red herring...
This is the msg I get when running autoupdate:-
+ autoupdate
autom4te.: no such file or directory: /dev/null
autoupdate.: cannot close autom4te --language=autoconf
--include=/usr/local/test/share/autoconf --trace AU_DEFUN:'AU:$f:$1'
--trace define:'AC:$f:$1' --melt /dev/null |:
at /usr/local/test/bin/autoupdate. line 185
And here's the relevant function:-
# HANDLE_AUTOCONF_MACROS ()
# -------------------------
# @M4_BUILTINS -- M4 builtins and a useful comment.
sub handle_autoconf_macros ()
{
my $macros = new Autom4te::XFile ("$autoconf"
. " --trace AU_DEFUN:'AU:\$f:\$1'"
. " --trace define:'AC:\$f:\$1'"
. " --melt /dev/null |");
while ($_ = $macros->getline)
{
chomp;
my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next;
# ../lib/m4sugar/m4sugar.m4 -> m4sugar
# ../lib/autoconf/general.m4 -> autoconf
# 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{$macro} = $set;
}
else
{
$au_macros{$macro} = $set;
}
}
$macros->close; #<----------------------------- line 185
# Don't keep AU macros in @AC_MACROS.
delete $ac_macros{$_}
foreach (keys %au_macros);
# Don't keep M4sugar macros which are redefined by Autoconf,
# such as `builtin', `changequote' etc. See autoconf/autoconf.m4.
delete $ac_macros{$_}
foreach (@m4_builtins);
die "$me: no current Autoconf macros found\n"
unless keys %ac_macros;
die "$me: no obsolete Autoconf macros found\n"
unless keys %au_macros;
if ($debug)
{
print STDERR "Current Autoconf macros:\n";
print STDERR join (' ', sort keys %ac_macros) . "\n\n";
print STDERR "Obsolete Autoconf macros:\n";
print STDERR join (' ', sort keys %au_macros) . "\n\n";
}
# ac.m4 -- autoquoting definitions of the AC macros (M4sugar excluded).
# unac.m4 -- undefine the AC macros.
my $ac_m4 = new Autom4te::XFile ">$tmp/ac.m4";
print $ac_m4 "# ac.m4 -- autoquoting definitions of the AC macros.\n";
my $unac_m4 = new Autom4te::XFile ">$tmp/unac.m4";
print $unac_m4 "# unac.m4 -- undefine the AC macros.\n";
foreach (sort grep { $ac_macros{$_} ne 'm4sugar' } keys %ac_macros)
{
print $ac_m4 "_au_define([$_], [[\$0(\$\@)]])\n";
print $unac_m4 "_au_undefine([$_])\n";
}
}
How do I set $debug ?
--
John
- Migrating to autoconf 2.52g, John Poltorak, 2002/02/04
- Re: Migrating to autoconf 2.52g, Tim Van Holder, 2002/02/04
- Re: Migrating to autoconf 2.52g, John Poltorak, 2002/02/04
- Re: Migrating to autoconf 2.52g, Paul Eggert, 2002/02/04
- Re: Migrating to autoconf 2.52g,
John Poltorak <=
- Re: Migrating to autoconf 2.52g, Akim Demaille, 2002/02/05
- Re: Migrating to autoconf 2.52g, John Poltorak, 2002/02/05
- Re: Migrating to autoconf 2.52g, Tim Van Holder, 2002/02/05
- Re: Migrating to autoconf 2.52g, Akim Demaille, 2002/02/05