From 01f2e225b2e7dcad5cb1e8e5aa384decb50174ad Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 21 Oct 2001 18:09:24 +0000 Subject: [PATCH] * automake.in (am_line_error): Clarify. --- ChangeLog | 5 +++++ automake.in | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69d14ad1..96411955 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-10-21 Akim Demaille + + * automake.in (am_line_error): Clarify. + + 2001-10-21 Akim Demaille * automake.in (&am_print_error): Set $exit_status since all your diff --git a/automake.in b/automake.in index 6c6b5321..bdcbbd46 100755 --- a/automake.in +++ b/automake.in @@ -8072,37 +8072,41 @@ sub am_file_error am_print_error ("$file: ", @args); } -sub am_line_error +# &am_line_error ($SYMBOL or $LINE, @ARGS) +# ---------------------------------------- +# Report an error about $SYMBOL. The error message is composed of the +# @ARGS, and try to find the location of the error of $SYMBOL. +sub am_line_error ($@) { my ($symbol, @args) = @_; if ($symbol && "$symbol" ne '-1') { - my $file = "${am_file}.am"; - + my $where; if ($symbol =~ /^\d+$/) { - # SYMBOL is a line number, so just add the colon. - $file .= ':' . $symbol; + # SYMBOL is a line number, then it must be a Makefile.am. + $where = "${am_file}.am:$symbol"; } elsif (defined $var_line{$symbol}) { # SYMBOL is a variable defined in Makefile.am, so add the # line number we saved from there. - $file .= ':' . $var_line{$symbol}; + $where = "${am_file}.am:$var_line{$symbol}"; } elsif (defined $configure_vars{$symbol}) { # SYMBOL is a variable defined in configure.ac, so add the # appropriate line number. - $file = $configure_vars{$symbol}; + $where = $configure_vars{$symbol}; } else { # Couldn't find the line number. + $where = "${am_file}.am"; } - am_print_error ("$file: ", @args); + am_file_error ($where, @args); } else { -- 2.43.5