automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: more locations (PR/360) + question


From: Alexandre Duret-Lutz
Subject: Re: FYI: more locations (PR/360) + question
Date: 30 Sep 2002 15:37:17 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "Akim" == Akim Demaille <address@hidden> writes:

[...]

 >> internal: libfoo_a_OBJECTS should not be defined
 >> Makefile.am:3:   while processing library `libfoo.a'

 Akim> I think that `internal' is wrong: make it `automake' instead.
 Akim> `internal' also sounds too much like `internal error'.

Ok, here you are.

2002-09-30  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (INTERNAL): Redefine as an empty location,
        so that internal locations get displayed as `automake:'.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1371
diff -u -r1.1371 automake.in
--- automake.in 30 Sep 2002 12:32:20 -0000      1.1371
+++ automake.in 30 Sep 2002 13:21:06 -0000
@@ -291,7 +291,7 @@
 
 # We can't always associate a location to a variable or a rule,
 # when its defined by Automake.  We use INTERNAL in this case.
-use constant INTERNAL => new Automake::Location 'internal';
+use constant INTERNAL => new Automake::Location;
 
 
 ## ---------------------------------- ##

 >> Now I'm open to suggestions about how these diagnostics could be
 >> output in a way which is more readable.  Would it be better to
 >> add a new line between each diagnostic, as follow?

 Akim> Well, let me speak as the devil :)  Make the real error a read message
 Akim> when the TTY supports it :)

What's a read message?  "hit any key"?

[...]

 >> /home/adl/projs/cvs/automake/HEAD2/tests/../lib/am/program.am: target 
 >> `libfoo.a$(EXEEXT)' was defined here
 >> Makefile.am:1:   while processing program `libfoo.a'

 Akim> Maybe we should extend to GCS to support shifting the secondary
 Akim> locations to the right?  Something like:

 Akim> /home/adl/projs/cvs/automake/HEAD2/tests/../lib/am/library.am: change 
your target to read `libfoo.a$(EXEEXT)'
 Akim>    Makefile.am:3:   while processing library `libfoo.a'

This could be nice.  (So far I've been indenting only the text of 
secondary locations, but that obviously doesn't make it easier to read.)

There are other questions related to diagnostic formating that could
be answered by the GCS:

  - how should multiline diagnostics be displayed?
    Presently Automake repeats the location, as in
      foo:3: this message spans
      foo:3: over two lines
    (that was what Automake did before I introduced Automake::Channels so
    I simply copied that)

  - how should errors and warnings be indicated?  Presently the
    Automake user has no way to differentiate warnings from errors --
    well, except $?.

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]