mirror of
git://git.sv.gnu.org/autoconf
synced 2024-12-03 02:00:36 +08:00
* lib/Autom4te/General.pm (@export_vars, @export_subs)
(@export_forward_subs): New. Add basename, dirname, and fileparse. (@EXPORT): Adjust. * bin/autoreconf.in (&autoreconf): Fix call to fileparse. Don't look for aclocal flags if we already know aclocal is not used. Move aclocal.m4t only if it exists. Reported by Ezra Peisach.
This commit is contained in:
parent
03cd990470
commit
3b536e758c
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2001-11-03 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/Autom4te/General.pm (@export_vars, @export_subs)
|
||||
(@export_forward_subs): New.
|
||||
Add basename, dirname, and fileparse.
|
||||
(@EXPORT): Adjust.
|
||||
* bin/autoreconf.in (&autoreconf): Fix call to fileparse.
|
||||
Don't look for aclocal flags if we already know aclocal is not
|
||||
used.
|
||||
Move aclocal.m4t only if it exists.
|
||||
Reported by Ezra Peisach.
|
||||
|
||||
|
||||
2001-11-03 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* bin/autoreconf.in (&parse_args): Work only on the configure.ac
|
||||
|
@ -181,8 +181,7 @@ sub parse_args ()
|
||||
sub autoreconf ($)
|
||||
{
|
||||
my ($configure_ac_path) = @_;
|
||||
my ($subdir, $configure_ac) = fileparse ($configure_ac_path);
|
||||
|
||||
my ($configure_ac, $subdir) = fileparse ($configure_ac_path);
|
||||
verbose "working in $subdir, on $configure_ac";
|
||||
chdir $subdir
|
||||
or die "$me: cannot chdir to $subdir: $!\n";
|
||||
@ -196,8 +195,11 @@ sub autoreconf ($)
|
||||
my $configure_ac_file = new Autom4te::XFile $configure_ac;
|
||||
while ($_ = $configure_ac_file->getline)
|
||||
{
|
||||
$uses_autoconf = 1
|
||||
if /AC_INIT/;
|
||||
if (/AC_INIT/)
|
||||
{
|
||||
$uses_autoconf = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (!$uses_autoconf)
|
||||
{
|
||||
@ -294,7 +296,7 @@ sub autoreconf ($)
|
||||
|
||||
# If there are flags for aclocal in Makefile.am, use them.
|
||||
my $aclocal_flags = '';
|
||||
if (-f 'Makefile.am')
|
||||
if ($uses_aclocal && -f 'Makefile.am')
|
||||
{
|
||||
my $makefile = new Autom4te::XFile 'Makefile.am';
|
||||
while ($_ = $makefile->getline)
|
||||
@ -302,7 +304,6 @@ sub autoreconf ($)
|
||||
if (/^ACLOCAL_[A-Z_]*FLAGS\s*=\s*(.*)/)
|
||||
{
|
||||
$aclocal_flags = $1;
|
||||
$uses_aclocal = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
@ -315,7 +316,9 @@ sub autoreconf ($)
|
||||
else
|
||||
{
|
||||
xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t");
|
||||
update_file ('aclocal.m4t', 'aclocal.m4');
|
||||
# aclocal may produce no output.
|
||||
update_file ('aclocal.m4t', 'aclocal.m4')
|
||||
if -f 'aclocal.m4t';
|
||||
}
|
||||
|
||||
# ------------------ #
|
||||
|
@ -29,10 +29,22 @@ use strict;
|
||||
use vars qw (@ISA @EXPORT);
|
||||
|
||||
@ISA = qw (Exporter);
|
||||
@EXPORT = qw (&backname &debug &find_configure_ac &find_file
|
||||
&getopt &mktmpdir &mtime
|
||||
&uniq &update_file &up_to_date_p &verbose &xsystem
|
||||
$debug $force $help $me $tmp $verbose $version);
|
||||
|
||||
# Variables we define and export.
|
||||
my @export_vars =
|
||||
qw ($debug $force $help $me $tmp $verbose $version);
|
||||
|
||||
# Functions we define and export.
|
||||
my @export_subs =
|
||||
qw (&backname &debug &find_configure_ac &find_file
|
||||
&getopt &mktmpdir &mtime
|
||||
&uniq &update_file &up_to_date_p &verbose &xsystem);
|
||||
|
||||
# Functions we forward (coming from modules we use).
|
||||
my @export_forward_subs =
|
||||
qw (&basename &dirname &fileparse);
|
||||
|
||||
@EXPORT = (@export_vars, @export_subs, @export_forward_subs);
|
||||
|
||||
# Variable we share with the main package. Be sure to have a single
|
||||
# copy of them: using `my' together with multiple inclusion of this
|
||||
|
Loading…
Reference in New Issue
Block a user