diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-10-22 21:23:59 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-10-22 21:23:59 (GMT) |
commit | 5d27012937307b5027ae28d17715b12ea959cc29 (patch) | |
tree | 479538b56d79dae19dccdb295c85822872482d67 /windows/hdf5build.BAT | |
parent | 3916f4ef4d59da0d8939ec06dcd6dc5079c2cc70 (diff) | |
download | hdf5-5d27012937307b5027ae28d17715b12ea959cc29.zip hdf5-5d27012937307b5027ae28d17715b12ea959cc29.tar.gz hdf5-5d27012937307b5027ae28d17715b12ea959cc29.tar.bz2 |
[svn-r17726] Updated the errorlevel checking for better error handling in the windows batch files.
Diffstat (limited to 'windows/hdf5build.BAT')
-rwxr-xr-x | windows/hdf5build.BAT | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/windows/hdf5build.BAT b/windows/hdf5build.BAT index 30ce1a0..598a0df 100755 --- a/windows/hdf5build.BAT +++ b/windows/hdf5build.BAT @@ -299,7 +299,11 @@ rem Build the HDF5 libraries. By default, C and C++ libraries are built. ) else (
devenv %hdf5_sln% %ccflags% /rebuild "%%a|%hdf5_platform%"
)
- if !errorlevel! neq 0 exit /b
+ if not errorlevel 0 (
+ set /a nerrors=!nerrors!+1
+ echo. Building %%a FAILED
+ exit /b 1
+ )
)
exit /b
@@ -321,8 +325,8 @@ rem This is where the magic happens :main
call :parse_params %*
- if %errorlevel% neq 0 (
- if !errorlevel! equ 1 (
+ if not errorlevel 0 (
+ if errorlevel 1 (
rem This isn't an error case-- this means /? was specified. Simply
rem quit.
goto end
@@ -335,7 +339,7 @@ rem This is where the magic happens )
call :setup
- if %errorlevel% neq 0 (
+ if not errorlevel 0 (
echo.Error setting up build environment.
goto error
)
@@ -343,7 +347,7 @@ rem This is where the magic happens rem Upgrade the project files if needed
if defined hdf5_vs2008 (
call :upgrade
- if !errorlevel! neq 0 (
+ if not errorlevel 0 (
echo.Error upgrading project files!
goto error
)
@@ -359,7 +363,7 @@ rem This is where the magic happens call :all
- if %errorlevel% neq 0 (
+ if not errorlevel 0 (
echo.Error building HDF5 libraries!
goto error
)
|