From 0916b8dc0877aa6268871d0eb6643c5240ff2659 Mon Sep 17 00:00:00 2001 From: stansmith Date: Fri, 11 Dec 2009 21:14:34 +0000 Subject: [PATCH] [WINOF] introduce new cmds 'allnf path' & 'compnf path' to work around a bug in the WDK build env. If one forces a build (compf ulp\ipoib) for IPoIB or IPoIB_NDIS6_CM then 'all' instances of ipoib.sys are deleted and only the specified path component is rebuild leaving an incomplete build. 'compnf/allnf ulp\ipoib' allows nmake dependancies to make the correct rebuild descision without deleting all instances of ipoib.sys. git-svn-id: svn://openib.tc.cornell.edu/gen1@2632 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/WinOF/BuildRelease.bat | 46 ++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/trunk/WinOF/BuildRelease.bat b/trunk/WinOF/BuildRelease.bat index 8dc72642..2074184b 100644 --- a/trunk/WinOF/BuildRelease.bat +++ b/trunk/WinOF/BuildRelease.bat @@ -1,16 +1,18 @@ @echo off setlocal rem tabstop=4 -rem + +rem version: 2.1.0 + rem EXAMPLE - Build entire openIB-windows release & WIX installers (.msi) files. rem Binary release is constructed in WinOF\Wix\OS\bin. rem Processor architecture specific WIX installers are constructed rem in %IDIR% rem rem BuildRelease option -rem option: all | allnoforce | allf | compile | compilenoforce | compf path | -rem compnf path | makebin | msi |sign | wix | clean | msi-label | -rem msi-del | msi-dir {OPENIB_REV} +rem option: all | allnoforce | allf | allnf | compile | compilenoforce | +rem compf path | compnf path | makebin | msi |sign | wix | clean | +rem msi-label | msi-del | msi-dir {OPENIB_REV} rem This script is an 'example' of a one-command entire IB stack build to rem single-file installer; used to build a WinOF releases. @@ -20,22 +22,32 @@ rem rem Verify the following env vars are suitible for your system configuration. rem _DDK, _PSDK, SVN, IDIR +rem 'nf path' command variants are required due to a bug in the WDK build env. +rem ipoib\ & ipoib_ndis6_cm\ both build ipoib.sys just for different OS +rem versions. The problem arises when a compile is forced on one folder or the +rem other, all instances of ipoib.sys are deleted + + if "%1" == "" goto usage if "%1" == "/?" goto usage if "%1" == "-h" goto usage if "%1" == "all" goto OK if "%1" == "allnoforce" goto OK if "%1" == "allf" ( +:allf if "%2" == "" goto usage + set FPATH=%2 if exist "%2" goto OK echo %0 Err - path .\%2 does not exist? exit /B 1 ) +if "%1" == "allnf" goto allf if "%1" == "compile" goto OK if "%1" == "compilenoforce" goto OK if "%1" == "compf" ( :cpf if "%2" == "" goto usage + set FPATH=%2 if exist "%2" goto OK echo %0 Err - path .\%2 does not exist? exit /B 1 @@ -62,6 +74,8 @@ echo allnoforce - recompile only if needed, makebin, sign drivers and echo build installers. echo allf path - force recompile the specified folder, makebin, echo sign drivers and build installers. +echo allnf path - recompile specified folder ONLY if required, makebin, +echo sign drivers and build installers. echo compile - force a recompile/link of everything then exit. echo compilenoforce - recompile/link only if needed then exit. echo compf path - force recompile (all arch*) specified folder @@ -141,6 +155,7 @@ rem A Digital driver signing certificate store name may be required. if "%1" == "all" goto chk_cert if "%1" == "allf" goto chk_cert +if "%1" == "allnf" goto chk_cert if "%1" == "msi" goto chk_cert if "%1" == "sign" goto chk_cert @@ -206,15 +221,12 @@ rem to contain the SVN number to use. rem set USE_SVN=1748 set USE_SVN=latest -if "%1" == "allf" ( -:fp - set FPATH=%2 - goto svn -) -if "%1" == "compf" goto fp -if "%1" == "compnf" goto fp +rem %2 can be either a file spec or IPENIB_REV value. +rem Based on %1 command, FPATH will/will-not be set to a file spec. + +if Not "%FPATH%" == "" goto svn -rem setup value for OPENIB_REV assignment; AND supported by if would be nice. +rem setup value for OPENIB_REV assignment if not "%2" == "" ( rem set SVN commit number. set SVN=%2 @@ -393,12 +405,16 @@ if "%1" == "allf" ( rem Force Compile everything set OPS=-wgcfPM 3 ) +if "%1" == "allnf" ( + rem Compile only if necessary + set OPS=-wgPM 3 +) if "%1" == "compf" ( rem Force Compile everything set OPS=-wgcfPM 3 ) if "%1" == "compnf" ( - rem Force Compile everything + rem Compile only if necessary set OPS=-wgPM 3 ) @@ -426,7 +442,7 @@ set WINOF_PATH=%CD% set OPENIB_REV=%SVN% if not DEFINED PLATFORM_SDK_PATH set PLATFORM_SDK_PATH=%_PSDK% -rem Compile in a specific folder? compf | compnf | allf +rem Compile in a specific folder? compf | compnf | allf | allnf if EXIST "%FPATH%" pushd %FPATH% rem ********* Compile for win7 - Windows 7 @@ -515,7 +531,7 @@ echo %0 - Build WNET ia64 Free %COMSPEC% /C "%BSE%\etc\bldwo.bat fre ia64 2003 %OPS%" if ERRORLEVEL 1 exit /B 1 -rem compnf | compf | allf +rem compnf | compf | allf | allnf if EXIST "%FPATH%" popd if "%1" == "compf" goto finito -- 2.46.0