It's not truly needed by the current code base.
* automake.in (define_configure_variable): in an AC_SUBST'd variable is to
be "ignored" (likely because the user has called 'AM_SUBST_NOTMAKE' on it),
return early without even defining the variable, rather than defining it
with type VAR_SILENT (which would have prevented its definition from being
output in the generated Makefile anyway).
* lib/Automake/VarDef.pm (VAR_SILENT): Delete.
(@EXPORT, Pod documentation): Adjust accordingly.
* lib/Automake/Variable.pm (_check_ambiguous_condition): Don't ignore
variables of type VAR_SILENT: there are no more of them.
(output): Don't skip variables of type VAR_SILENT: there are no more of
them.
(define): The value of the '$pretty' parameter can't be VAR_SILENT anymore.
Adjust internal checks and Pod documentation accordingly.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
# Some variables we do not want to output. For instance it
# would be a bad idea to output `U = @U@` when `@U@` can be
# substituted as `\`.
- my $pretty = exists $ignored_configure_vars{$var} ? VAR_SILENT : VAR_ASIS;
+ return if exists $ignored_configure_vars{$var};
Automake::Variable::define ($var, VAR_CONFIGURE, '', TRUE, subst $var,
- '', $configure_vars{$var}, $pretty);
+ '', $configure_vars{$var}, VAR_ASIS);
}
use vars '@ISA', '@EXPORT';
@ISA = qw/Automake::ItemDef Exporter/;
@EXPORT = qw (&VAR_AUTOMAKE &VAR_CONFIGURE &VAR_MAKEFILE
- &VAR_ASIS &VAR_PRETTY &VAR_SILENT);
+ &VAR_ASIS &VAR_PRETTY);
=head1 NAME
use constant VAR_CONFIGURE => 1;# Variable defined in configure.ac.
use constant VAR_MAKEFILE => 2; # Variable defined in Makefile.am.
-=item C<VAR_ASIS>, C<VAR_PRETTY>, C<VAR_SILENT>
+=item C<VAR_ASIS>, C<VAR_PRETTY>
Possible print styles. C<VAR_ASIS> variables should be output as-is.
C<VAR_PRETTY> variables are wrapped on multiple lines if they cannot
-fit on one. C<VAR_SILENT> variables are not output at all.
-
-C<VAR_SILENT> variables can also be overridden silently (unlike the
-other kinds of variables whose overriding may sometimes produce
-warnings).
+fit on one.
=cut
# Possible values for pretty.
use constant VAR_ASIS => 0; # Output as-is.
use constant VAR_PRETTY => 1; # Pretty printed on output.
-use constant VAR_SILENT => 2; # Not output. (Can also be
- # overridden silently.)
=back
definitions).
Finally, C<$pretty> tells how the variable should be output, and can
-be one of C<VAR_ASIS>, C<VAR_PRETTY>, or C<VAR_SILENT>.
+be one of C<VAR_ASIS>, C<VAR_PRETTY>.
=cut
# We allow silent variables to be overridden silently,
# by either silent or non-silent variables.
my $def = $self->def ($ambig_cond);
- if ($message && $def->pretty != VAR_SILENT)
+ if ($message)
{
msg 'syntax', $where, "$message ...", partial => 1;
msg_var ('syntax', $var, "... '$var' previously defined here");
. $self->name . "'")
unless $def;
- next
- if $def->pretty == VAR_SILENT;
-
$res .= $def->comment;
my $val = $def->raw_value;
C<$where>: the C<Location> of the assignment.
-C<$pretty>: whether C<$value> should be pretty printed (one of C<VAR_ASIS>,
-C<VAR_PRETTY>, or C<VAR_SILENT>, defined by L<Automake::VarDef>).
+C<$pretty>: whether C<$value> should be pretty printed (one of C<VAR_ASIS>
+or C<VAR_PRETTY> defined by L<Automake::VarDef>).
C<$pretty> applies only to real assignments. I.e., it does not apply to
a C<+=> assignment (except when part of it is being done as a conditional
C<=> assignment).
prog_error "pretty argument missing"
unless defined $pretty && ($pretty == VAR_ASIS
- || $pretty == VAR_PRETTY
- || $pretty == VAR_SILENT);
+ || $pretty == VAR_PRETTY);
# If there's a comment, make sure it is \n-terminated.
if ($comment)