[jamming] Spurious warning in 2.5?

Russell Shaw rjshaw at iprimus.com.au
Thu Feb 20 14:31:08 PST 2003


Anthony Heading wrote:

>Hi,
>
>I tried to send this to this list a week ago, but I think it must have
>been lost.
>
>2.5 pre seems to believe there is a circular dependency from the
>following Jamfile:
>
>===============================
>
>rule CProto
>{
>    DEPENDS $(<) : $(>) ;
>    INCLUDES $(>) : $(<) ;
>}
>
>actions CProto
>{
>    cproto -o $(<) $(>)
>}
>
>CProto file.cproto.h : file.c ;
>
>Main file : file.c ;
>
>===============================
>
>The idea here is that an included header file is
>autogenerated from source - for example "cproto"
>is a program which autogenerates a prototype header.
>
>All seems to work cleanly with 2.4.
>
>2.5pre says:
>warning: file.c depends on itself
>
>which I think is entirely false.  file.c is a source
>file and doesn't depend on anything. 
>
>Any confirmation or opposite about whether this
>indeed a bug or not much welcomed.
>  
>

Expanding it out shows:

  DEPENDS file.cproto.h : file.c
  INCLUDES file.c : file.cproto.h

So, file.cproto.h depends on file.c. However, whatever
depends on file.c also depends on file.cproto.h. Therefore,
file.cproto.h depends on file.cproto.h. The error message
seems to be wrong, but it still looks like a circular dependency.




More information about the jamming mailing list