Craig Allsop | 16 Sep 2002 02:28

Re: rule File?

I've just tried to create a small test case:

--- a.cpp
#include <a.h>
void main(){}
--- a.h
#include <b.h>
--- b.h

--- jamfile
SubDirHdrs . ;
Main a : a.cpp ;
File c.h : a.h ;

I was trying to recreate the problem described initially (which it doesn't),
however another problem that I'm having trouble with is shown.

The File rule here will cause jam to evaluate the a.h node (as it is
dependant on 'files') before the a.cpp node (which adds HDRRULE on it). No
headers are scanned on a.h as a result. Take out the File rule from my
jamfile and dependancies on a.h are processed as expected.

The problem is, variables are set during the bind pass, sometimes after the
fate is already determined. Perhaps the bind pass should comprise of two
passes, one for determining header dependencies/variables and another to
determine fate? What implications does this have?

Provided that I can overcome this issue, I'd like to compile/link files with
c.h as I have one project that generates libraries and headers to a common
location in my source tree and several other projects would be
(Continue reading)


Gmane