[jamming] Jamming with subdirectories

Russell rjshaw at iprimus.com.au
Fri Feb 7 07:51:57 PST 2003

Ingo Weinhold wrote:
>>Ingo Weinhold wrote:
>>>On Wed, 5 Feb 2003, Russell wrote:
>>>>In the top level Jamfile, i've got:...
>>Running 'jam' at the top level gives errors:
>>   don't know how to make main.o
>>   don't know how to make serial.o
> Sorry, this was my bad. I forgot, that MainFromObjects unfortunately 
> grists the source targets. So the MainFromObjects line is equivalent to 
> `MainFromObjects myprog : main.o serial.o ;' which of course doesn't 
> work, unless the LOCATE variable of the targets is set accordingly:
>   LOCATE on main.o = main ;
>   LOCATE on serial.o = serial ;
>   MainFromObjects myprog : main.o serial.o ;

Hi, it works now:)
I've also made it so that myprog.exe is put into the objs subdirectory:

SubDir TOP;
MainFromObjects myprog : main.o serial.o ;
LOCATE on main.o = main ;
LOCATE on serial.o = serial ;

In Jamrules, i've made gcc generate myprog.exe as well as a myprog.map
file. However, despite trying a few different ways, i can't get myprog.map
to go into the 'objs' directory; it just ends up in the top directory. There
seems to be dozens of possible ways to do that. What would be the right way
that runs with the philosophy of jam?

More information about the jamming mailing list