[ofw] [PATCH] Fix up build scripts

Fab Tillier ftillier at windows.microsoft.com
Thu Jun 26 19:47:44 PDT 2008


This patch makes the build scripts a little easier to use (IMO).

The bldwo.bat script now accepts multiple build parameters, so you can separate them.  For example, bldwo chk x86 2008 -Ccwg is the same as bldwo chk x86 2008 -C -c -w -g.

The script also is changed to eliminate the need for the WINOF_PATH environment variable, so it can be run from any directory.

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

Index: bldwoall.bat
===================================================================
--- bldwoall.bat        (revision 1300)
+++ bldwoall.bat        (working copy)
@@ -3,17 +3,17 @@
 rem Builds the winof stack for all platforms.
 rem

-call bldwo chk x86  2003 %1
-call bldwo fre x86  2003 %1
-call bldwo chk x64  2003 %1
-call bldwo fre x64  2003 %1
-call bldwo chk ia64 2003 %1
-call bldwo fre ia64 2003 %1
-call bldwo chk x86  2008 %1
-call bldwo fre x86  2008 %1
-call bldwo chk x64  2008 %1
-call bldwo fre x64  2008 %1
-call bldwo chk ia64 2008 %1
-call bldwo fre ia64 2008 %1
+call bldwo chk x86  2003 %*
+call bldwo fre x86  2003 %*
+call bldwo chk x64  2003 %*
+call bldwo fre x64  2003 %*
+call bldwo chk ia64 2003 %*
+call bldwo fre ia64 2003 %*
+call bldwo chk x86  2008 %*
+call bldwo fre x86  2008 %*
+call bldwo chk x64  2008 %*
+call bldwo fre x64  2008 %*
+call bldwo chk ia64 2008 %*
+call bldwo fre ia64 2008 %*

 @echo on
Index: bldwo.bat
===================================================================
--- bldwo.bat   (revision 1300)
+++ bldwo.bat   (working copy)
@@ -2,12 +2,17 @@
 setlocal

 if "%WDK_PATH%"=="" goto use
-if "%WINOF_PATH%"=="" goto use
 if "%OPENIB_REV%"=="" goto use
 if "%PLATFORM_SDK_PATH%"=="" goto use

-if "%1"=="chk" goto set_arch
-if "%1"=="fre" goto set_arch
+if "%1"=="chk" (
+       set wo_bld=chk
+       goto set_arch
+)
+if "%1"=="fre" (
+       set wo_bld=fre
+       goto set_arch
+)
 goto use

 :set_arch
@@ -43,14 +48,20 @@
 goto use

 :set_bld
-set wo_bld_opt=wg
-if NOT "%4"=="" set wo_bld_opt=%4
+if "%4"=="" set wo_bld_opt=-wg & goto do_build

+:loop
+if "%4"=="" goto do_build
+set wo_bld_opt=%wo_bld_opt% %4
+shift
+goto loop
+
+:do_build
 set DDKBUILDENV=
-call %WDK_PATH%\bin\setenv.bat %WDK_PATH%\ %1 %wo_arch% %wo_os%
-pushd %WINOF_PATH%
-build -%wo_bld_opt%
+pushd .
+call %WDK_PATH%\bin\setenv.bat %WDK_PATH%\ %wo_bld% %wo_arch% %wo_os%
 popd
+build %wo_bld_opt%
 goto end

 :use
@@ -67,14 +78,15 @@
 echo PLATFORM_SDK_PATH (example set PLATFORM_SDK_PATH=c:\progra~1\mi2578~1)
 echo -
 echo Use:
-echo bldwo {chk : fre} {x86 : x64 : ia64} {xp : 2003 : 2008} [options]
+echo bldwo {chk : fre} {x86 : x64 : ia64} {xp : 2003 : 2008} [-options]
 echo Default build options are 'wg'.
 echo xp only supports x86 build
 echo -
 echo Examples:
 echo bldwo chk x86 2003      - builds checked x86 version for 2003 using -wg
 echo bldwo chk x64 2003      - builds checked x64 version for 2003 using -wg
-echo bldwo fre x64 2008 wgc  - builds free    x64 version for 2008 using -wgc
+echo bldwo fre x64 2008 -wgc  - builds free    x64 version for 2008 using -wgc
+echo bldwo fre x64 2008 -w -g -c  - builds free    x64 version for 2008 using -wgc
 echo -
 echo Also see docs\build.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bldscript.patch
Type: application/octet-stream
Size: 2822 bytes
Desc: bldscript.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080626/f51286a6/attachment.obj>


More information about the ofw mailing list