Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-09-28 01:02:01


On Wednesday 28 September 2005 09:37, Liam Routt wrote:
> Liam Routt wrote:
> > I'm tossing up whether to 1) patch the jambase.c file and compile our
> > own derivative of boost-jam for this project, or 2) use -f ourbase.jam.
> > The first option seems like overkill, but the second option requires a
> > command line argument for each use of jam, which bites.
>
> I have opted to patch bjam with the following:
>
> ==============
> --- builtins.c 2005-07-13 14:26:01.000000000 +1000
> +++ builtins.c.new 2005-09-27 10:01:30.000000000 +1000
> @@ -320,7 +320,7 @@
>
> {
> char * args[] = { "command", 0 };
> - bind_builtin( "SHELL",
> + bind_builtin( "COMMAND",
> builtin_shell, 0, args );
> }
> ==============
>
> Respectfully, I would urge the team to consider this patch themselves.
> It seem decidely odd to add a builtin command (with useful
> functionality) that is hidden by pre-existing rules. And even if you
> remove the compatibility rule you are still left with a piece of new
> fucntionality sharing the same "word" with an existing default rule
> (Shell), which can only lead to confusion. By using a different word
> altogether you avoid all of those problems.

I'd prefer to remove the "SHELL" rule in Jambase. After all, it's
compatibility with some extra old version of Jam.

> Obviously you are not using the default Jambase with BB, so this is not
> an issue for your primary development, but it would be of use to those
> who are leveraging off of your basic jam advances.

I'm sorry to say that, but unfortunately I'm not sure we can support using
bjam with stock Jambase in any reasonable way. Say, speaking of proposed
SHELL->COMMAND remane, we'd have to decide it's fine, apply patch, change
docs, and any code that might be using SHELL, and them some user might be
still unaware of the change and come pretty surprised and would ask where'
SHELL. I'm afraid I don't have much time for that.

> As a followup question, I've noticed that the returned list has a
> newline and a character (usually M or L?) appended to it. Is there a
> particular reason for this (perhaps returning the status?)? Stripping it
> off is not impossible (would be easier if MATCH recognised \n), but it
> feels like an oversight in some way).

Are you using the most up-to-date version? There were a bug where random
character was added to result of SHELL, which was then fixed. As for "\n" --
well, I think it returns whatever the command outputs.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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