Boost logo

Boost-Build :

Subject: Re: [Boost-build] bjam JAMSHELL
From: Gerhard (gerhard_lipp_at_[hidden])
Date: 2008-09-27 13:02:54


Juergen Hunold schrieb:
> Hi Gerhard !
hello juergen!

thanks for your fast reply!
>
> On Wednesday 24 September 2008 20:20:10 Gerhard Lipp wrote:
>
>> i would like to specify a different shell for bjam on windows xp (namely
>> sh.exe).
>> i tried to place
>>
>> JAMSHELL = C:\\Programme\\A-Toolchain\\bin\\sh.exe -c % ;
>>
>> in my Jamroot file, though without success, the windows cmd "shell" gets
>> called.
>
> Sorry, no ideas on that. Maybe you should try it on the Boost.Build Mailing
> list next time. I'm cc'ing that list for this reason.
>
>> background: i have to invoke a shell script (wx-config) to get my
>> cxxflags like that
>>
>> local wx_cxxflags = [ SHELL "wx-config --cxxflags | tr -d '\\n'" ] ;
>
> This is WxWidgets, right ?
right
>
> Maybe you can try out Renes Boost.Build extensions. Take a look at
>
> https://svn.boost.org/svn/boost/sandbox/tools/build_extensions/ext/wxwidgets.jam
seems not to work out of the box. since i am new to bjam i would like to
start with something simpler :)
>
> and see if this helps.
>
> Yours,
>
> Jürgen
up to now i live with that "solution" (which is all but readable or good
scaling

import os ;

if [ os.name ] = NT
{
        # execution of shell-script wx-config is required, thus
        # the script is called in context of sh.exe context.
        # requires that sh.exe is in PATH
        # the first sed changes all / to backslash e.g. c/Programme --> c\Programme
        # the second sed changes all include directives e.g. -I\c\Programme -->
-Ic:\Programme
        # tr removes the trailing newline
        # note: all escapeing backslashed are required twice (one for bjam and
one for sh )
        wx_cxxflags = [ SHELL "sh wx-config --cxxflags | sed -e
's/\\//\\\\\\\\/g' | sed -e 's/-I\\\\\\\\\\(.\\)/-I\\1:/g' | tr -d
'\\n'" ] ;
        wx_linkflags = [ SHELL "sh wx-config --libs | tr -d '\\n'" ] ;
}
else
{
        # tr removes the trailing newline
        wx_cxxflags = [ SHELL "wx-config --cxxflags | tr -d '\\n'" ] ;
        wx_linkflags = [ SHELL "wx-config --libs | tr -d '\\n'" ] ;
}

regards,

gerhard


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