]> sourceware.org Git - automake.git/commitdiff
* automake.in (&am_target_error): New.
authorAkim Demaille <akim@epita.fr>
Sun, 21 Oct 2001 18:10:20 +0000 (18:10 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 21 Oct 2001 18:10:20 +0000 (18:10 +0000)
Use it where appropriate instead of...
(&am_line_error): this.
Using it for a target is a croak error.

ChangeLog
automake.in

index 780b5dd5e9e68e4459d91e4fc382b2d3357e7733..dfb4b67b586b9edca45854b94dbcc8ca834e9eed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-10-21  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&am_target_error): New.
+       Use it where appropriate instead of...
+       (&am_line_error): this.
+       Using it for a target is a croak error.
+
 2001-10-21  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&am_macro_error): New.
index f4ebbb635866346bdec5e1db401c367562f70784..6e82b046098d3f6e486ea1fb19b4c6735cce0e52 100755 (executable)
@@ -3991,7 +3991,7 @@ sub handle_footer
       if variable_value ('SOURCES');
 
 
-    &am_line_error ('.SUFFIXES',
+    am_target_error ('.SUFFIXES',
                    "use variable `SUFFIXES', not target `.SUFFIXES'")
       if target_defined ('.SUFFIXES');
 
@@ -4203,13 +4203,13 @@ sub handle_factored_dependencies
        {
            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'");
     }
@@ -4217,7 +4217,7 @@ sub handle_factored_dependencies
     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");
     }
@@ -6645,7 +6645,7 @@ sub rule_define ($$$$)
          ? ! defined $target_conditional{$target}
          : defined $target_conditional{$target}))
   {
-      &am_line_error ($target,
+      am_target_error ($target,
                      "$target defined both conditionally and unconditionally");
   }
 
@@ -8077,7 +8077,7 @@ sub am_file_error
 
 # &am_macro_error ($MACRO, @ARGS)
 # -------------------------------
-# Report an error, @ARGS,  about $MACRO.
+# Report an error, @ARGS, about $MACRO.
 sub am_macro_error ($@)
 {
     my ($macro, @args) = @_;
@@ -8085,6 +8085,16 @@ sub am_macro_error ($@)
 }
 
 
+# &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
@@ -8095,22 +8105,25 @@ sub am_line_error ($@)
 
     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.
This page took 0.044434 seconds and 5 git commands to generate.