if variable_value ('SOURCES');
- &am_line_error ('.SUFFIXES',
+ am_target_error ('.SUFFIXES',
"use variable `SUFFIXES', not target `.SUFFIXES'")
if target_defined ('.SUFFIXES');
{
my $x = $utarg;
$x =~ s/(data|exec)-//;
- &am_line_error ($utarg, "use `$x', not `$utarg'");
+ am_target_error ($utarg, "use `$x', not `$utarg'");
}
}
if (&target_defined ('install-local'))
{
- &am_line_error ('install-local',
+ am_target_error ('install-local',
"use `install-data-local' or `install-exec-local', "
. "not `install-local'");
}
if (!defined $options{'no-installinfo'}
&& &target_defined ('install-info-local'))
{
- &am_line_error ('install-info-local',
+ am_target_error ('install-info-local',
"`install-info-local' target defined but "
. "`no-installinfo' option not in use");
}
? ! defined $target_conditional{$target}
: defined $target_conditional{$target}))
{
- &am_line_error ($target,
+ am_target_error ($target,
"$target defined both conditionally and unconditionally");
}
# &am_macro_error ($MACRO, @ARGS)
# -------------------------------
-# Report an error, @ARGS, about $MACRO.
+# Report an error, @ARGS, about $MACRO.
sub am_macro_error ($@)
{
my ($macro, @args) = @_;
}
+# &am_target_error ($TARGET, @ARGS)
+# ---------------------------------
+# Report an error, @ARGS, about the rule $TARGET.
+sub am_target_error ($@)
+{
+ my ($target, @args) = @_;
+ am_file_error ($targets{$target}, @args);
+}
+
+
# &am_line_error ($SYMBOL or $LINE, @ARGS)
# ----------------------------------------
# Report an error about $SYMBOL. The error message is composed of the
if ($symbol && "$symbol" ne '-1')
{
- my $where;
if ($symbol =~ /^\d+$/)
{
# SYMBOL is a line number, then it must be a Makefile.am.
- $where = "${am_file}.am:$symbol";
+ am_file_error ("${am_file}.am:$symbol", @args);
}
elsif (defined $configure_vars{$symbol})
{
# SYMBOL is a variable defined in configure.ac, so add the
# appropriate line number.
- $where = $configure_vars{$symbol};
+ am_file_error ($configure_vars{$symbol}, @args);
}
elsif (defined $var_location{$symbol})
{
croak "use am_macro_error for macros: $symbol\n";
}
+ elsif (defined $targets{$symbol})
+ {
+ croak "use am_target_error for targets: $symbol\n";
+ }
else
{
# Couldn't find the line number.