3 messages in com.perforce.jamming[jamming] SEARCH_SOURCE or LOCATE_TAR...
FromSent OnAttachments
Paul...@scee.net04 Apr 2003 02:31 
Paul...@scee.net04 Apr 2003 04:08 
Ingo Weinhold04 Apr 2003 06:59 
Subject:[jamming] SEARCH_SOURCE or LOCATE_TARGET - which to use?
From:Ingo Weinhold (bone@cs.tu-berlin.de)
Date:04/04/2003 06:59:20 AM
List:com.perforce.jamming

Paul@scee.net wrote:

Vladimir Prus wrote:

Paul@scee.net wrote:

Hi,

LOCATE_TARGET on $(SCE_TOP)/ee/lib/crt0.s = $(TOP) ; LinkLibraries animtable : libexpat ; ...

But it still produces the crt0.o in $(SCE_TOP)/ee/lib. What am I doing wrong? I've tried putting the LOCATE_TARGET line before 'Main animtable : ...' but it doesn't make any difference. Looking at the output of jam -d+7, it just seems to be ignoring the LOCATE_TARGET line.

Not to be detered, I tried a different approach, which was this:

SubDir TOP ; Main animtable : crt0.s support.cpp animtable.cpp xmlelement.cpp xmlparser.cpp ; SEARCH_SOURCE on crt0.s = $(SCE_TOP)/ee/lib ;

Paul, last time I hacked on Jam code, it cared only for "SEARCH" and "LOCATE" variables.... I think you should use those.

There is a bit of truth in it, but only a bit. In fact, when binding targets jam only uses the SEARCH and LOCATE variables, but these variables are set by concerned rules from SEARCH_SOURCE/LOCATE_SOURCE/ LOCATE_TARGET. Therefore you obviously need to set the latter variables *before* invoking the rules that use them -- in your case this is Main (eventually invoking Object, which sets SEARCH and LOCATE).

For the benefit of the list, this was the solution. jam seriously needs better examples and documentation.

Mmh, while I tend to agree in general, in case of SEARCH and LOCATE it isn't that bad.

CU, Ingo