local (@arglist) = @_;
local (@make_list);
- while ($#arglist >= 0)
+ while (@arglist)
{
if ($arglist[0] eq "--version")
{
shift (@arglist);
}
- if ($#make_list < 0)
+ if (! @make_list)
{
# Look around for some files.
push (@make_list, 'Makefile') if -f 'Makefile.am';
}
die "automake: no \"Makefile.am\" found or specified\n"
- if $#make_list < 0;
+ if ! @make_list;
}
return (@make_list);
{
local ($arg, @arglist) = @_;
die "automake: no argument given for option \`$arg'\n"
- if $#arglist >= 0;
+ if ! @arglist;
}
################################################################
'programs', 'PROGRAMS',
'bin', 'sbin', 'libexec', 'noinst');
# FIXME error if PROGRAMS defined but no blah_PROGRAMS defined.
- return if $#proglist < 0;
+ return if ! @proglist;
local ($obj) = &get_object_extension;
local ($one_file, $munge);
'libraries', 'LIBRARIES',
'lib', 'pkglib', 'noinst');
# FIXME error if LIBRARIES defined but no blah_LIBRARIES defined.
- return if $#liblist < 0;
+ return if ! @liblist;
# Generate _LIBFILES variables. Too bad we can't do this in
# am_install_var.
return if ! $texis;
local (@texis) = split (/\s+/, $texis);
- if ($#texis > 0)
+ if (@texis > 1)
{
&am_error ('sorry, only one file allowed in `TEXINFOS\'');
return;
&push_dist_common ("\$" . $infobase . '_TEXINFOS');
}
- if ($#texis >= 0)
+ if (@texis)
{
$output_rules .= ($infobase . ".info: "
. join (' ', @texis) . "\n\n");
}
$output_trailer .= ".SUFFIXES:\n";
- if ($#suffixes >= 0)
+ if (@suffixes)
{
$output_trailer .= ".SUFFIXES: " . join (' ', @suffixes) . "\n";
}
? " installdirs-recursive\n"
: "\n"));
push (@phony, 'installdirs');
- if ($#installdirs >= 0)
+ if (@installdirs)
{
&pretty_print_rule ("\t\$(top_srcdir)/mkinstalldirs ", "\t\t",
@installdirs);
push (@install, 'install-recursive');
push (@uninstall, 'uninstall-recursive');
- if ($#install_exec >= 0)
+ if (@install_exec)
{
$output_rules .= ('install-exec-am: '
. join (' ', @install_exec)
push (@install, 'install-exec-am');
push (@phony, 'install-exec-am');
}
- if ($#install_data >= 0)
+ if (@install_data)
{
$output_rules .= ('install-data-am: '
. join (' ', @install_data)
push (@install, 'install-data-am');
push (@phony, 'install-data-am');
}
- if ($#uninstall >= 0)
+ if (@uninstall)
{
$output_rules .= ('uninstall-am: '
. join (' ', @uninstall)
}
# Step three: print definitions users can use.
- if ($#install_exec >= 0)
+ if (@install_exec)
{
$output_rules .= ("install-exec: "
. join (' ', @install_exec)
push (@install, 'install-exec') if !$recursive_install;
push (@phony, 'install-exec');
}
- if ($#install_data >= 0)
+ if (@install_data)
{
$output_rules .= ("install-data: "
. join (' ', @install_data)
}
$output_rules .= $name . ":";
- if ($#values >= 0)
+ if (@values)
{
$output_rules .= ' ' . join (' ', @values);
}
local (@args) = @_;
local ($do_all, $do_clean) = (1, 0);
- while ($#args >= 0)
+ while (@args)
{
if ($args[0] eq '-clean')
{
}
}
- if (! defined $contents{$primary} && $#used >= 0)
+ if (! defined $contents{$primary} && @used)
{
# Define it.
&pretty_print ($primary . ' =', '', @used);
}
# Push here because PRIMARY might be configure time determined.
- push (@all, '$(' . $primary . ')') if ($do_all && $#used >= 0);
+ push (@all, '$(' . $primary . ')') if ($do_all && @used);
# Look for misspellings. It is an error to have a variable ending
# in a "reserved" suffix whose prefix is unknown, eg