Boost logo

Boost-Build :

From: Matthieu P. (matt_at_[hidden])
Date: 2003-12-16 16:27:04


Hello,

Using bjam, I am building and testing a prgm which uses environment
variables (getenv(xxx)).
I wish these variables to be set during the execution of the prgm, and
reset as soon as the prgm exits.
In addition, I would like this system to be portable accross at least
$(UNIX) and $(NT). Currently, somewhere in my Jamrules, I have something
like:

if $(UNIX)
{
actions foo
{
env BAR=$(BAR) BAZ=$(BAZ) $(>)
}
}
else if $(NT)
{
actions foo
{
set BAR=$(BAR)
set BAZ=$(BAZ)
$(>)
}
}

I suspect I am doing something wrong, and that there must be a better
way of achieving the same result. One of the problem is that, under
Windows, all the environment variables are echoed at each 'set', which
completely prevents the user from monitoring the progress of the build.

I understand this question is borderline with bjam, I hope I am not too
offtopic :^)

Thanks for your recommendations,

Matthieu

 


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