|
Boost-Build : |
Subject: Re: [Boost-build] Doc build failure on release branch
From: Ryo IGARASHI (rigarash_at_[hidden])
Date: 2008-11-09 04:27:46
FYI,
On Thu, Oct 9, 2008 at 11:21 PM, Steve M. Robbins <steve_at_[hidden]> wrote:
> On Thu, Oct 09, 2008 at 09:36:15AM +0400, Vladimir Prus wrote:
>
>> In fact, the original
>>
>> return "$(variable)=$(value)$(nl)export $(variable)$(nl)" ;
>>
>> probably is too complex, as
>>
>> return "export $(variable)=$(value)$(nl)" ;
>>
>> should work everywhere, too.
>
> Actually, it is the first formulation that is more portable.
>
> The second works in Bash (and perhaps other shells) but not in the
> original Bourne shell. I'm not sure whether cygwin can be installed
> with /bin/sh as something other than bash, but it's safer to use the
> original IMHO.
As an example, even on Solaris 10, the default shell (/bin/sh) fails when
$ export TEST=test
is executed.
To be portable but does not want to use newline, you can use
return "$(variable)=$(value); export $(variable)$(nl)" ;
(I don't know whether I can safely use semicolons inside double quotes)
Best regards,
-- Ryo IGARASHI rigarash_at_[hidden]
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