Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-02-03 18:46:50


I just checked in the changes I talked about earlier with regards to
adding options to the SHELL/COMMAND builtin. In the process I also added
to the EXIT builtin the ability to specify a result value to exit with.
I needed it to be able to implement a very minimal unit test facility
for testing the SHELL changes. QuickBook documentation for both is also
updated:

[pre
rule EXIT ( /message/ * : /result-value/ ? )
]

Blurts out the /message/ to stdout and then exits with a failure status
if no /result-value/ is given, otherwise it exits with the given
/result-value/.

"=Echo=", "=echo=", "=Exit=", and "=exit=" are accepted as aliases for
=ECHO= and =EXIT=, since it is hard to tell that these are built-in
rules and not part of the language, like "=include=".

[pre
rule SHELL ( /command/ : * )
]

=SHELL= executes /command/, and then returns the standard output of
/command/. =SHELL= only works on platforms with a =popen()= function in
the C library. On platforms without a working =popen()= function,
=SHELL= is implemented as a no-op. =SHELL= works on Unix, MacOS X, and
most Windows compilers. =SHELL= is a no-op on Metrowerks compilers under
Windows. There is a variable set of allowed options as additional arguments:

[variablelist
     [[=exit-status=] [In addition to the output the result status of
the executed command is returned as a second element of the result.]]
     [[=no-output=] [Don't capture the output of the command. Instead an
empty ("") string value is returned in place of the output.]]
]

Because the Perforce/Jambase defines a =Shell= rule which hides the
builtin =COMMAND= can be used as an alias for =SHELL=.

Please test for both compatibility with the existing uses of SHELL. And
of course if you have a need with the new functionality. There are some
minor unit test at boost-root/tools/jam/test.

Hopefully bjam is now in a state that I can make a 3.1.12 release. That
is if no one has objections.

...And i just saw Jim made some QNX fixes :-)

--
-- 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