From 633bd0826eed0b0f15af89537adaa6e1ee36a59e Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 21 Oct 2001 18:10:35 +0000 Subject: [PATCH] * automake.in (&read_am_file): Define and use `$here'. Avoid using am_line_error. --- ChangeLog | 6 ++++++ automake.in | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index dfb4b67b..5986b0f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-10-21 Akim Demaille + + * automake.in (&read_am_file): Define and use `$here'. + Avoid using am_line_error. + + 2001-10-21 Akim Demaille * automake.in (&am_target_error): New. diff --git a/automake.in b/automake.in index 6e82b046..2a157bb1 100755 --- a/automake.in +++ b/automake.in @@ -6745,6 +6745,7 @@ sub read_am_file ($) my $last_var_name = ''; my $last_var_type = ''; my $last_var_value = ''; + my $here = "$amfile:$."; # FIXME: shouldn't use $_ in this loop; it is too big. while ($_) { @@ -6766,7 +6767,7 @@ sub read_am_file ($) { # Stick a single white line before the incoming macro or rule. $spacing = "\n"; - &am_line_error ($., "blank line following trailing backslash") + am_file_error ($here, "blank line following trailing backslash") if $saw_bk; } elsif (/$COMMENT_PATTERN/o) @@ -6774,7 +6775,7 @@ sub read_am_file ($) # Stick comments before the incoming macro or rule. $comment .= $spacing . $_; $spacing = ''; - &am_line_error ($., "comment following trailing backslash") + am_file_error ($here, "comment following trailing backslash") if $saw_bk; } elsif ($saw_bk) @@ -6799,7 +6800,7 @@ sub read_am_file ($) $comment = $spacing = ''; macro_define ($last_var_name, 0, $last_var_type, $cond, - $last_var_value, "$amfile:$.") + $last_var_value, $here) if $cond ne 'FALSE'; push (@var_list, $last_var_name); } @@ -6808,15 +6809,15 @@ sub read_am_file ($) elsif (/$IF_PATTERN/o) { - $cond = cond_stack_if ($1, $2, "$amfile:$."); + $cond = cond_stack_if ($1, $2, $here); } elsif (/$ELSE_PATTERN/o) { - $cond = cond_stack_else ($1, $2, "$amfile:$."); + $cond = cond_stack_else ($1, $2, $here); } elsif (/$ENDIF_PATTERN/o) { - $cond = cond_stack_endif ($1, $2, "$amfile:$."); + $cond = cond_stack_endif ($1, $2, $here); } elsif (/$RULE_PATTERN/o) @@ -6824,7 +6825,7 @@ sub read_am_file ($) # Found a rule. $was_rule = 1; - rule_define ($1, 0, $cond, $.); + rule_define ($1, 0, $cond, $here); $output_trailer .= $comment . $spacing; $output_trailer .= &make_condition (@cond_stack); @@ -6860,7 +6861,7 @@ sub read_am_file ($) macro_define ($last_var_name, 0, $last_var_type, $cond, - $last_var_value, "$amfile:$.") + $last_var_value, $here) if $cond ne 'FALSE'; push (@var_list, $last_var_name); } @@ -6890,7 +6891,7 @@ sub read_am_file ($) $output_trailer .= &make_condition (@cond_stack); $output_trailer .= $_; $comment = $spacing = ''; - &am_line_error ($., "`#' comment at start of rule is unportable") + am_file_error ($here, "`#' comment at start of rule is unportable") if $_ =~ /^\t\s*\#/; } -- 2.43.5