Update buildbat.tmpl
Batch scripts generated by `koch csources` now return proper error codes, and stop when there is an error.
This commit is contained in:
parent
01b262d8d1
commit
1b4dd6f61e
1 changed files with 12 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ REM call the compiler:
|
||||||
ECHO %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
ECHO %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||||
%CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
%CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||||
# linkCmd.add(" " & changeFileExt(f, "o"))
|
# linkCmd.add(" " & changeFileExt(f, "o"))
|
||||||
|
IF ERRORLEVEL 1 (GOTO:END)
|
||||||
# end for
|
# end for
|
||||||
|
|
||||||
ECHO %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS%
|
ECHO %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS%
|
||||||
|
|
@ -27,4 +28,14 @@ ECHO %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS%
|
||||||
|
|
||||||
# end block
|
# end block
|
||||||
|
|
||||||
ECHO SUCCESS
|
:END
|
||||||
|
IF ERRORLEVEL 1 (
|
||||||
|
ECHO FAILURE
|
||||||
|
ECHO.
|
||||||
|
ECHO CSource compilation failed. Please check that the gcc compiler is in
|
||||||
|
ECHO the PATH environment variable, and that you are calling the batch script
|
||||||
|
ECHO that matches the target architecture of the compiler.
|
||||||
|
) ELSE (
|
||||||
|
ECHO SUCCESS
|
||||||
|
)
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue