[jamming] Spurious warning in 2.5?

Russell Shaw rjshaw at iprimus.com.au
Fri Feb 21 12:49:54 PST 2003


Anthony Heading wrote:
> On Fri, Feb 21, 2003 at 09:31:08AM +1100, Russell Shaw wrote:
> 
>>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.
> 
> 
> Ah yes. Hmm. I guess that dependency is really an unwanted
> artifact of the way that INCLUDES works.
> Is there a way to express the correct relationship without
> generating that dependency or warning message?

I haven't done any jam for a while, but i'd start with this:

rule CProto
{
    DEPENDS $(<) : $(>) ;
    DEPENDS exe : $(<) ;
}

actions CProto
{
    cproto -o $(<) $(>)
}

CProto file.cproto.h : file.c ;

Main file : file.c ;

===============================

exe is a sudo target used in rule MainFromObjects:
   http://public.perforce.com/public/jam/src/Jambase

What file includes file.cproto.h? This information might
be needed to get the order of updating right.

 > The idea here is that an included header file is
 > autogenerated from source - for example "cproto"
 > is a program which autogenerates a prototype header.




More information about the jamming mailing list