From: Akim Demaille Date: Tue, 8 May 2001 13:53:29 +0000 (+0000) Subject: * automake.in (&file_contents_internal): Apply the @cond_stack to X-Git-Tag: Release-1-4-p1~14 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b3b24c575c980ea4149d4a649f767c07b78acd25;p=automake.git * automake.in (&file_contents_internal): Apply the @cond_stack to the rules and assignments. Don't rely on `$.' as it's biased by &make_paragraphs. Don't remove backslashes in variable values. --- diff --git a/ChangeLog b/ChangeLog index c41fa933..b131c4ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-05-08 Akim Demaille + + * automake.in (&file_contents_internal): Apply the @cond_stack to + the rules and assignments. + Don't rely on `$.' as it's biased by &make_paragraphs. + Don't remove backslashes in variable values. + 2001-05-08 Akim Demaille * automake.in ($IGNORE_PATTERN): Improve for multi-line matches. diff --git a/automake.in b/automake.in index 1db97bb6..cdf0fc32 100755 --- a/automake.in +++ b/automake.in @@ -7008,18 +7008,20 @@ sub file_contents_internal ($%) if (!defined $targets{$targets} && $cond ne 'FALSE') { + $paragraph =~ s/^/make_condition (@cond_stack)/gme; $result_rules .= "$spacing$comment$paragraph\n"; - rule_define ($targets, $is_am, $cond, $.); + rule_define ($targets, $is_am, $cond, $file); } $comment = $spacing = ''; last; } } } + elsif (/$ASSIGNMENT_PATTERN/mso) { my ($var, $type, $val) = ($1, $2, $3); - &prog_error ("$file:$.: macro `$var' with trailing backslash") + &am_file_error ($file, "macro `$var' with trailing backslash") if /\\$/;; # Accumulating variables must not be output. @@ -7027,9 +7029,7 @@ sub file_contents_internal ($%) if (!defined $var_comment{$var} || substr ($var_comment{$var}, -1) ne "\n"); $var_comment{$var} .= "$comment"; - # Strip the continuation backslashes. - $val =~ s/\\$//mg; - macro_define ($var, $is_am, $type, $cond, $val, $.) + macro_define ($var, $is_am, $type, $cond, $val, $file) if $cond ne 'FALSE'; push (@var_list, $var); @@ -7048,6 +7048,7 @@ sub file_contents_internal ($%) # or some part of a rule cut by an if/endif. if ($cond ne 'FALSE') { + s/^/make_condition (@cond_stack)/gme; $result_rules .= "$spacing$comment$_\n"; } $comment = $spacing = '';