Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-09-07 17:26:14


K. Noel Belcourt wrote:
> On Sep 7, 2006, at 2:28 PM, Rene Rivera wrote:
>
>> K. Noel Belcourt wrote:
>>> I've looked at what's done in the Boost distribution but from what I
>>> can tell, it seems to require modifications to the Jambase, which I'd
>>> rather avoid if possible. Any ideas?
>> No need to change Jambase... There's a global var "ARGV" which
>> holds all
>> the arguments. Take a look at how the Boost Jamfile.v2
>> <http://boost.cvs.sourceforge.net/boost/boost/Jamfile.v2?
>> revision=1.38&view=markup#l_175>
>> handles all the options it uses.
>
> Okay, that's weird.
>
> Here's my Jamroot
>
> local build-directory = [ MATCH "^--builddir=(.*)" : $(ARGV) ] ;
> build-directory ?= bin ;
>
> project : : : build-dir $(build-directory) ;
>
> bjam --v2
>
> builds in the bin directory as it should. Unfortunately,
>
> bjam --v2 --builddir=junk
>
> also builds in the bin directory. Anything obvious I'm doing wrong?

Yes ;-) Everything is a module in BBv2 so you need to get the variable
from the global module. Use "[ module.peek : ARGV ]" instead of "$(ARGV)".

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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