4 messages in com.perforce.jamming[jamming] SubInclude and current work...
FromSent OnAttachments
Dag Asheim07 May 2003 05:37 
Ingo Weinhold07 May 2003 07:52 
Dag Asheim07 May 2003 09:24 
Ingo Weinhold07 May 2003 09:56 
Subject:[jamming] SubInclude and current working directory for the compiler
From:Dag Asheim (da@linpro.no)
Date:05/07/2003 09:24:08 AM
List:com.perforce.jamming

Ingo Weinhold <bone@cs.tu-berlin.de> writes:

On Wed, 7 May 2003, Dag Asheim wrote:

~/simple/src/Jamfile: HDRS = ../include ;

Main hello : hello.c ;

[...]

~/simple/src/Jamfile: SubInclude TOP src ;

Fascinating, your filesystem seems to support overlaying of files. ;-)

Yes, it's a really nifty feature. It can be confusing, though! :-)

The SUBDIR variable contains the path to the directory of the Jamfile. You can use that as a base for constructing a relative path. BTW, it is also better pratice to use the SubDirHdrs rule to add include directories for the current subdir. So, your line would read: SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) include ] ;

Thanks! This looks like a workable solution. I'll try it out tomorrow morning.

Side note: Wouldn't it be easier if actions be default was done with current working directory (cwd) set to the right value? There are bound to be tools that use cwd in some way and that can't be overridden like the C compiler.