2003-07-26 Alexandre Duret-Lutz <adl@gnu.org>
+ * automake.in (get_object_extension, handle_languages)
+ (handle_single_transform_list, handle_compile, handle_compile)
+ (handle_texinfo_helper, handle_texinfo_helper, handle_man_pages)
+ (handle_tests, handle_minor_options, check_gnu_standards)
+ (lang_sub_obj, lang_c_rewrite, lang_c_finish, rule_define):
+ Simplify "if (defined $options{'X'})" into "if ($options{'X'})".
+
Complete changes from 2003-07-08.
* automake.in ($cmdline_use_dependencies, $use_dependencies): Remove,
replaced by $options{'no-dependencies'}.
# Check for automatic de-ANSI-fication.
$extension = '$U' . $extension
- if defined $options{'ansi2knr'};
+ if $options{'ansi2knr'};
$get_object_extension_was_run = 1;
$output_flag = '-o'
if (! $output_flag
&& $lang->name eq 'c'
- && defined $options{'subdir-objects'});
+ && $options{'subdir-objects'});
# Compute a possible derived extension.
# This is not used by depend2.am.
my $obj_sans_ext = substr ($object, 0,
- length ($this_obj_ext));
my $full_ansi = $full;
- if ($lang->ansi && defined $options{'ansi2knr'})
+ if ($lang->ansi && $options{'ansi2knr'})
{
$full_ansi =~ s/$KNOWN_EXTENSIONS_PATTERN$/\$U$&/;
$obj_sans_ext .= '$U';
# Boilerplate.
my $default_includes = '';
- if (! defined $options{'nostdinc'})
+ if (! $options{'nostdinc'})
{
$default_includes = ' -I. -I$(srcdir)';
$output_rules .= "$coms$rules";
# Check for automatic de-ANSI-fication.
- if (defined $options{'ansi2knr'})
+ if ($options{'ansi2knr'})
{
my ($ansi2knr_filename, $ansi2knr_where) = @{$options{'ansi2knr'}};
my $ansi2knr_dir = '';
push (@dist_targets, 'dist-info');
- if (! defined $options{'no-installinfo'})
+ if (! $options{'no-installinfo'})
{
# Make sure documentation is made and installed first. Use
# $(INFO_DEPS), not 'info', because otherwise recursive makes
# Do some error checking. Note that this file is not required
# when in Cygnus mode; instead we defined TEXINFO_TEX explicitly
# up above.
- if ($need_texi_file && ! defined $options{'no-texinfo.tex'})
+ if ($need_texi_file && ! $options{'no-texinfo.tex'})
{
if ($need_texi_file > 1)
{
new Automake::Location,
MANS => "@mans");
- if (! defined $options{'no-installman'})
- {
- push (@all, '$(MANS)');
- }
+ push (@all, '$(MANS)')
+ unless $options{'no-installman'};
}
# Handle DATA variables.
reject_target ('install-info-local',
"`install-info-local' target defined but "
. "`no-installinfo' option not in use")
- unless defined $options{'no-installinfo'};
+ unless $options{'no-installinfo'};
# Install the -local hooks.
foreach (keys %dependencies)
# Handle TESTS variable and other checks.
sub handle_tests
{
- if (defined $options{'dejagnu'})
+ if ($options{'dejagnu'})
{
&handle_tests_dejagnu;
}
# Handle some of the minor options.
sub handle_minor_options
{
- if (defined $options{'readme-alpha'})
+ if ($options{'readme-alpha'})
{
if ($relative_dir eq '.')
{
{
msg ('error-gnu', $options{$opt},
"option `$opt' disallowed by GNU standards")
- if (defined $options{$opt});
+ if $options{$opt};
}
}
# when a subdir object should be used.
sub lang_sub_obj
{
- return defined $options{'subdir-objects'} ? LANG_SUBDIR : LANG_PROCESS;
+ return $options{'subdir-objects'} ? LANG_SUBDIR : LANG_PROCESS;
}
# Rewrite a single C source file.
{
my ($directory, $base, $ext) = @_;
- if (defined $options{'ansi2knr'} && $base =~ /_$/)
+ if ($options{'ansi2knr'} && $base =~ /_$/)
{
# FIXME: include line number in error.
err_am "C source file `$base.c' would be deleted by ansi2knr rules";
}
my $r = LANG_PROCESS;
- if (defined $options{'subdir-objects'})
+ if ($options{'subdir-objects'})
{
$r = LANG_SUBDIR;
$base = $directory . '/' . $base
}
}
- if (defined $options{'ansi2knr'} && keys %de_ansi_files)
+ if ($options{'ansi2knr'} && keys %de_ansi_files)
{
# Make all _.c files depend on their corresponding .c files.
my @objects;
&& $target_name{$noexe}{$cond} ne $target)
{
# The no-exeext option enables this feature.
- if (! defined $options{'no-exeext'})
+ if (! $options{'no-exeext'})
{
msg ('obsolete', $targets{$noexe}{$cond},
"deprecated feature: target `$noexe' overrides "