|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-03-09 07:45:32
AFAICT, when msvc links from a non-NT-build of bjam, errors will be
ignored, because the *nix equivalent of
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
that you see in the ordinary MSVC actions is not replicated for non-NT
platforms.
I request that this cut/paste approach be replaced with the approach
used in testing.jam:
if [ os.name ] = NT
{
STATUS = %status% ;
SET_STATUS = "set status=%ERRORLEVEL%" ;
RUN_OUTPUT_NL = "echo." ;
STATUS_0 = "%status% EQU 0 (" ;
STATUS_NOT_0 = "%status% NEQ 0 (" ;
VERBOSE = "%verbose% EQU 1 (" ;
ENDIF = ")" ;
SHELL_SET = "set " ;
CATENATE = type ;
CP = copy ;
}
else
{
STATUS = "$status" ;
SET_STATUS = "status=$?" ;
RUN_OUTPUT_NL = "echo" ;
STATUS_0 = "test $status -eq 0 ; then" ;
STATUS_NOT_0 = "test $status -ne 0 ; then" ;
VERBOSE = "test $verbose -eq 1 ; then" ;
ENDIF = "fi" ;
SHELL_SET = "" ;
CATENATE = cat ;
CP = cp ;
}
...
actions capture-output bind INPUT_FILES output-file
{
$(PATH_SETUP)
$(LAUNCHER) "$(>)" $(ARGS) "$(INPUT_FILES)" > "$(output-file)" 2>&1
$(SET_STATUS)
$(RUN_OUTPUT_NL) >> "$(output-file)"
echo EXIT STATUS: $(STATUS) >> "$(output-file)"
if $(STATUS_0)
$(CP) "$(output-file)" "$(<)"
$(ENDIF)
$(SHELL_SET)verbose=$(VERBOSE_TEST)
if $(STATUS_NOT_0)
$(SHELL_SET)verbose=1
$(ENDIF)
if $(VERBOSE)
echo ====== BEGIN OUTPUT ======
$(CATENATE) "$(output-file)"
echo ====== END OUTPUT ======
$(ENDIF)
exit $(STATUS)
}
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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