+2001-04-09 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&make_condition): Return '#' when FALSE.
+ (&conditional_string): Return FALSE, not '#' in the corresponding
+ cases.
+ (&file_contents_internal): Adjust.
+ (&check_variable_defined_unconditional): Dump the guilty variable.
+
2001-04-09 Akim Demaille <akim@epita.fr>
* distdir.am: Use and abuse of if/endif.
{
my $res = conditional_string (@_);
- return $res
- if $res eq '' or $res eq '#' ;
-
- $res = '@' . $res . '@';
- $res =~ s/ /@@/g;
+ # There are no conditions.
+ if ($res eq '')
+ {
+ # Nothing to do.
+ }
+ # It's impossible.
+ elsif ($res eq 'FALSE')
+ {
+ $res = '#';
+ }
+ # Build it.
+ else
+ {
+ $res = '@' . $res . '@';
+ $res =~ s/ /@@/g;
+ }
return $res;
}
if (grep (/^FALSE$/, @stack))
{
- return '#';
+ return 'FALSE';
}
else
{
else
{
&am_line_error ($parent,
- "warning: automake does not support $var being defined conditionally")
+ "warning: automake does not support $var being defined conditionally");
+ variable_dump ($var);
+
}
}
}
# Output only if not in FALSE.
if (defined $dependencies{$_}
- && $cond ne "#")
+ && $cond ne 'FALSE')
{
&depend ($_, @deps);
$actions{$_} .= $actions;
# Free lance dependency. Output the rule for all the
# targets instead of one by one.
if (!defined $targets{$targets}
- && $cond ne "#")
+ && $cond ne 'FALSE')
{
$result_rules .= "$separator$comment$paragraph\n";
rule_define ($targets, 1, $cond, $.);
# of (which is detected by the first reading of
# `header-vars.am'), we must not output them.
$result_vars .= "$separator$comment$_\n"
- if $type ne '+' && $var_is_am{$var} && $cond ne '#';
+ if $type ne '+' && $var_is_am{$var} && $cond ne 'FALSE';
$comment = $separator = '';
}
# This isn't an error; it is probably some tokens which
# configure is supposed to replace, such as `@SET-MAKE@',
# or some part of a rule cut by an if/endif.
- if ($cond ne "#")
+ if ($cond ne 'FALSE')
{
$result_rules .= "$separator$comment$_\n";
}