summaryrefslogtreecommitdiffstats
path: root/windows/hdf5build.BAT
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-10-22 21:24:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-10-22 21:24:15 (GMT)
commit5e4ca646167c821631ccd5912719e4284b6dc89d (patch)
tree64ea8aafb2e9fdb3e1cd58bec497344104859b6d /windows/hdf5build.BAT
parent5f87e53d049995a3664e2d364919838a6ffe7e61 (diff)
downloadhdf5-5e4ca646167c821631ccd5912719e4284b6dc89d.zip
hdf5-5e4ca646167c821631ccd5912719e4284b6dc89d.tar.gz
hdf5-5e4ca646167c821631ccd5912719e4284b6dc89d.tar.bz2
[svn-r17727] Updated the errorlevel checking for better error handling in the windows batch files.
Diffstat (limited to 'windows/hdf5build.BAT')
-rwxr-xr-xwindows/hdf5build.BAT16
1 files changed, 10 insertions, 6 deletions
diff --git a/windows/hdf5build.BAT b/windows/hdf5build.BAT
index b9aac04..05a8f04 100755
--- a/windows/hdf5build.BAT
+++ b/windows/hdf5build.BAT
@@ -303,7 +303,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
@@ -325,8 +329,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
@@ -339,7 +343,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
)
@@ -347,7 +351,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
)
@@ -363,7 +367,7 @@ rem This is where the magic happens
call :all
- if %errorlevel% neq 0 (
+ if not errorlevel (
echo.Error building HDF5 libraries!
goto error
)