5 messages in com.perforce.jamming[jamming] Library rule quirks with LO...
FromSent OnAttachments
John...@nanaon-sha.co.jp30 Jun 2000 01:00 
Dave...@vignette.com03 Jul 2000 11:14 
Dian...@yahoo.com03 Jul 2000 20:07 
Dave...@creo.com04 Jul 2000 14:18 
Roesler07 Jul 2000 18:28 
Subject:[jamming] Library rule quirks with LOCATE
From:Dave...@creo.com (Dave@creo.com)
Date:07/04/2000 02:18:11 PM
List:com.perforce.jamming

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?