Boost logo

Boost-Build :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-06-04 15:58:29


Hi,

I've been having trouble getting the iostreams Jamfiles to work correctly when
one or both of zlib and bzip2 is not present. After an error was reported today,
I managed to figure out what was going wrong, but have been able to fix it
because of my poor understanding of the language.

Among other thing, I realized I don't really know how to return a value from a
Jam rule. For example, I had the following code in zlib.jam:

rule zlib_config
{

# ...

if $(NT) && ! $(ZLIB_SOURCE) && ! $(ZLIB_INCLUDE)
{
ECHO ****************************************************** ;
ECHO ;
ECHO Building Boost.Iostreams with zlib and gzip support disabled. ;
ECHO HINT: define the environment variable ZLIB_SOURCE to point to ;
ECHO the root directory of your zlib installation if you have one. ;
ECHO For more options, consult the Boost.Iostreams documentation ;
ECHO ;
ECHO ****************************************************** ;
return ;
}

# more stuff here
...
}

I just discovered that the return statement does not seem to prevent control
from continuing past the "if" block to the line marked "...". In particular, if
I change the above to

if $(NT) && ! $(ZLIB_SOURCE) && ! $(ZLIB_INCLUDE)
{
ECHO ****************************************************** ;
ECHO ;
ECHO Building Boost.Iostreams with zlib and gzip support disabled. ;
ECHO HINT: define the environment variable ZLIB_SOURCE to point to ;
ECHO the root directory of your zlib installation if you have one. ;
ECHO For more options, consult the Boost.Iostreams documentation ;
ECHO ;
ECHO ****************************************************** ;
return ;
ECHO !!!!!!!!!!!!!!!!!!!!!! ;
}

I get the output

******************************************************

Building Boost.Iostreams with zlib and gzip support disabled.
HINT: define the environment variable ZLIB_SOURCE to point to
the root directory of your zlib installation if you have one.
For more options, consult the Boost.Iostreams documentation

******************************************************
!!!!!!!!!!!!!!!!!!!!!!

I really have no idea what's going on here.

Please help me !!!

Jonathan

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk