Boost logo

Boost-Build :

From: Piotr Jachowicz (pjachowi_at_[hidden])
Date: 2008-03-18 05:14:48


Hello,

Bjam under Cygwin tries to export path without surrounding it with ""
(for example when unit-test refers to project in different directory).
If path contains spaces it causes error, like this:

/bin/sh: line 1: and: command not found

    PATH=/cygdrive/c/Documents and
Settings/pjachowi/tocxml/bin/gcc-3.4.4/debug:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$PATH
export PATH

I've fixed it by replacing $(value) with \"$(value)\" for non-NT
systems in rule variable-setting-command (tools/common.jam):

rule variable-setting-command ( variable : value )
{
    local nl = "
" ;

    if [ os.name ] = NT
    {
        return "set $(variable)=$(value)$(nl)" ;
    }
    else
    {
        return $(variable)="\"$(value)\"$(nl)export $(variable)$(nl)" ;
    }
}

Is it correct solution?

-- 
Piotr Jachowicz

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