generate.bat: Moved error messages out of sub-routines

This commit is contained in:
Steve Holme 2015-08-03 22:45:04 +01:00
Родитель 12f915ca2a
Коммит 1e67bc5eaf
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -93,9 +93,9 @@ rem If you need to set the errorlevel do this instead: CALL :seterr [#]
echo.
echo Generating prerequisite files
call :gen_curlbuild
if errorlevel 1 goto error
if errorlevel 1 goto nogencurlbuild
call :gen_hugehelp
if errorlevel 1 goto error
if errorlevel 1 goto nogenhugehelp
) else (
echo.
echo Removing prerequisite files
@ -436,7 +436,6 @@ rem Returns exit code 0 on success or 1 on failure.
)
findstr "/C:void hugehelp(void)" ..\src\tool_hugehelp.c 1>NUL 2>&1
if %ERRORLEVEL% neq 0 (
echo Error: Unable to generate ..\src\tool_hugehelp.c
exit /B 1
)
exit /B 0
@ -448,7 +447,6 @@ rem Returns exit code 0 on success or 1 on failure.
echo * %CD%\..\include\curl\curlbuild.h
copy /y ..\include\curl\curlbuild.h.dist ..\include\curl\curlbuild.h 1>NUL
if %ERRORLEVEL% neq 0 (
echo Error: Unable to generate ..\include\curl\curlbuild.h
exit /B 1
)
exit /B 0
@ -488,6 +486,16 @@ rem Returns exit code 0 on success or 1 on failure.
echo Error: This batch file cannot run from a network drive
goto error
:nogencurlbuild
echo.
echo Error: Unable to generate ..\include\curl\curlbuild.h
goto error
:nogenhugehelp
echo.
echo Error: Unable to generate ..\src\tool_hugehelp.c
goto error
:seterr
rem Set the caller's errorlevel.
rem %1[opt]: Errorlevel as integer.