[jamming] Jam - trying to get it to link executables with correct library in multiple directories
Alex Buell
alex.buell at munted.org.uk
Wed Aug 16 14:42:08 PDT 2006
Hi,
I've got a strange problem; Jam doesn't seem to link executables with
the required library; here's my directory structure:
Boost/
any/
assign/# Jamrules
signals
Jamrules in base directory is:
JAMRULES_ALREADY_SEEN = TRUE ;
C++FLAGS = -Wall -O3 -pipe -s ;
LINKFLAGS = -s ;
C++ = g++ ;
LINK = g++ ;
LIB_FS = boost_filesystem ;
LIB_SIG = boost_signals ;
Jamfile in base directory is:
SubDir TOP ;
if ! $(JAMRULES_ALREADY_SEEN)
{
include $(TOP)/Jamrules ;
}
SubInclude TOP any ;
SubInclude TOP assign ;
SubInclude TOP filesystem ;
SubInclude TOP signals ;
The problem directories (filesystem and signals) respective Jamfiles
are:
SubDir TOP filesystem ;
if ! $(JAMRULES_ALREADY_SEEN)
{
include $TOP/Jamrules ;
}
LINKFLAGS = -l$(LIB_FS) ;
PROGRAMS = find_file gen simple_ls try path_test ;
for t in $(PROGRAMS)
{
Main $(t) : $(t).cpp ;
}
and:
SubDir TOP signals ;
if ! $(JAMRULES_ALREADY_SEEN)
{
include $TOP/Jamrules ;
}
LINKFLAGS = -l$(LIB_SIG) ;
PROGRAMS = signal ;
for t in $(PROGRAMS)
{
Main $(t) : $(t).cpp ;
}
If I run Jam in both filesystem and signals, both links with the
correct libraries, but if I run Jam in base directory, it tries to link
both sets of executables with -lboost_signals (instead of only linking
with boost_filesystem in filesystem/ and boost_signals in signals/).
This is wrong. Any ideas what I am doing wrong?
--
http://www.munted.org.uk
Bien sur mes talons sont toxiques. N'avez vous pas vu ma boite?
More information about the jamming
mailing list