summaryrefslogtreecommitdiffstats
path: root/windows/hdf5bt.BAT
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2008-04-30 19:51:13 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2008-04-30 19:51:13 (GMT)
commitaec106e324ce20e5efb725c25a6a333c7970127b (patch)
tree234df369115a46b08037c5f385061cf58823e497 /windows/hdf5bt.BAT
parent5773fd34bc5adf59b4530d95ac9f0c0585902803 (diff)
downloadhdf5-aec106e324ce20e5efb725c25a6a333c7970127b.zip
hdf5-aec106e324ce20e5efb725c25a6a333c7970127b.tar.gz
hdf5-aec106e324ce20e5efb725c25a6a333c7970127b.tar.bz2
[svn-r14903] Undoing change committed in r14902.
Diffstat (limited to 'windows/hdf5bt.BAT')
-rwxr-xr-xwindows/hdf5bt.BAT48
1 files changed, 45 insertions, 3 deletions
diff --git a/windows/hdf5bt.BAT b/windows/hdf5bt.BAT
index 26b1e14..192940e 100755
--- a/windows/hdf5bt.BAT
+++ b/windows/hdf5bt.BAT
@@ -19,6 +19,9 @@ rem This batch file takes the following options:
rem . /fort Build and test HDF5 with Fortran libraries
rem . /useenv Build HDF5 using compiler settings defined
rem . in the environment, rather than the IDE.
+rem . /log Log the build and test results in files defined by
+rem . environment variables HDF5BUILD_LOG and
+rem . HDF5CHECK_LOG
rem . /? Help information
rem By Xuan Bai
rem Created: Aug. 16, 2004
@@ -33,6 +36,8 @@ rem - szip and zlib DLLs are already placed in an accessible directory
rem - hdf5_ext_szip or hdf5_ext_zlib have been set accordingly
rem - if building with the /useenv option, szip and zlib paths have been added
rem to %include% and %libpath% as necessary.
+rem - if using the /log option, hdf5build_log and hdf5_check log should be defined
+rem - in the environment.
rem By default, only C and C++ libraries are built and tested.
@@ -40,6 +45,7 @@ setlocal enabledelayedexpansion
pushd %~dp0
set nerrors=0
+if "%1"=="/?" goto help
goto main
rem Print a help message
@@ -69,6 +75,10 @@ rem Parse through the parameters sent to file, and set appropriate variables
rem Pass /useenv flag to devenv
set hdf5_useenv=true
+ ) else if "%%a"=="/log" (
+ rem Log our results to files defined in environment
+ set hdf5_logresults=true
+
) else if "%%a"=="/?" (
rem Set errorlevel 1 and send to help
call :help
@@ -102,21 +112,49 @@ rem Setup our environment
set hdf5build_params=%hdf5build_params% /useenv
)
+ rem Clear out our log files if they will be used
+ if defined hdf5_logresults (
+ if not defined hdf5build_log (
+ echo.Error: HDF5BUILD_LOG not defined in environment!
+ exit /b 1
+ ) else (
+ type nul > !hdf5build_log!
+ )
+
+ if not defined hdf5check_log (
+ echo.Error: HDF5CHECK_LOG not defined in environment!
+ exit /b 1
+ ) else (
+ type nul > !hdf5check_log!
+ )
+ )
+
exit /b 0
rem Build HDF5 libraries and tools
:build
- call hdf5build.bat %hdf5build_params%
+ if defined hdf5_logresults (
+ echo.Calling hdf5bbuild.bat %hdf5build_params%
+ echo.Results logged in %hdf5build_log%
+ call hdf5build.bat %hdf5build_params% > !hdf5build_log! 2>&1
+ ) else (
+ call hdf5build.bat %hdf5build_params%
+ )
exit /b
rem Test our libraries and tools
:test
-
- call hdf5check %hdf5check_params%
+ if defined hdf5_logresults (
+ echo.Calling hdf5check.bat %hdf5check_params%
+ echo.Results logged in %hdf5check_log%
+ call hdf5check %hdf5check_params% > !hdf5check_log! 2>&1
+ ) else (
+ call hdf5check %hdf5check_params%
+ )
exit /b
@@ -151,6 +189,10 @@ rem This is where the magic happens
)
call :setup
+ if %errorlevel% neq 0 (
+ echo.Error setting up hdf5bt environment!
+ goto error
+ )
echo.*****************************************************************************
echo. Build and Test HDF5 Library and Tools