Hi,
I've just started to use jam (under Windows NT), and I'm very interested in
putting my libs in a idfferent directory from my obj, which is different
from my source.
I saw the email earlier today about this, and I thought I would share my
solution and see what others might have to say about it.
The default implementation of the Library rule looks like:
rule Library
{
LibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
Objects $(>) ;
}
I created an override for the Library rule in my Jamrules file:
rule Library
{
LOCATE_TARGET = $(OBJ_TARGET) ;
if ! $(<:D)
{
LibraryFromObjects $(<:D=$(LIB_TARGET)) : $(>:S=$(SUFOBJ)) ;
}
else
{
LibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
}
Objects $(>) ;
}
and I use LIB_TARGET and OBJ_TARGET to control where the libraries go.
This seems to work for me, and it doesn't appear to rebuild anything
unnecessarily.
Does anyone see any flaws with this?