Приемлемый батник compile

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@echo off
set COMPILER=build
for %%R in (*.cref) do echo y | refgo %COMPILER%(Lexer+Preprocessor+StdLib+runtime+StdLibEx) %%R %%~nR.ref 2>__err || goto :ON_ERROR_CREF %%R %%~nR.ref
erase __err
echo.
for %%R in (*.ref) do refc %%R 2>__err || goto :ON_ERROR_REF %%R %%~nR.rsl
erase __err
echo Y | refgo parser.rsl+build\runtime.rsl+build\StdLib.rsl+build\Lexer.rsl+build\StdLibEx.rsl test.txt result.txt 2>__err || goto :ON_ERROR_REF %%R %%~nR.rsl
goto :EOF
:ON_ERROR_CREF
echo.
echo Compilation %1-^>%2 failed with debug dump '__err'
goto :EOF
:ON_ERROR_REF
echo.
echo Compilation %1-^%2 failed:
type __err
erase __err
goto :EOF