[ofw] [PATCH 5/7] etc/build script

Sean Hefty sean.hefty at intel.com
Thu May 15 16:06:24 PDT 2008


The following build script allows building the winof stack for any
platform (OS and processor architecture) from a single command prompt
window.  Guaranteed to save your sanity, versus having a dozen build
windows opened to build the various winof flavors.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
Note: it'd be great if we eliminated dynamically created files from
the build tree, or relocate them into build specific directories.  All
builds must currently be done sequentially because of this.

Index: bldwo.bat
===================================================================
--- bldwo.bat	(revision 0)
+++ bldwo.bat	(revision 0)
@@ -0,0 +1,83 @@
+ at echo off
+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
+goto use
+
+:set_arch
+if "%2"=="x86" (
+	set wo_arch=x86
+	goto set_os
+)
+if "%2"=="x64" (
+	set wo_arch=x64
+	goto set_os
+)
+if "%2"=="ia64" (
+	set wo_arch=64
+	goto set_os
+)
+goto use
+
+:set_os
+if "%3"=="2003" (
+	set wo_os=wnet
+	goto set_bld
+)
+if "%3"=="2008" (
+	set wo_os=WLH
+	goto set_bld
+)
+if "%3"=="xp" (
+	if not "%2"=="x86" goto use
+	set wo_os=WXP
+	set wo_arch=
+	goto set_bld
+)
+goto use
+
+:set_bld
+set wo_bld_opt=wg
+if NOT "%4"=="" set wo_bld_opt=%4
+
+set DDKBUILDENV=
+call %WDK_PATH%\bin\setenv.bat %WDK_PATH%\ %1 %wo_arch% %wo_os%
+pushd %WINOF_PATH%
+build -%wo_bld_opt%
+popd
+goto end
+
+:use
+echo -
+echo bldwo - build winof
+echo -
+echo Allows building any OS/processor architecture from a single command window.
+echo You must customize for your system by setting the following environment
+echo variables:
+echo -
+echo WDK_PATH          (example set WDK_PATH=c:\winddk\6001.18001)
+echo WINOF_PATH        (example set WINOF_PATH=c:\ofw\trunk)
+echo OPENIB_REV        (example set OPENIB_REV=0)
+echo PLATFORM_SDK_PATH (example set PLATFORM_SDK_PATH=c:\progra~1\mi2578~1)
+echo -
+echo Use:
+echo bldib {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 bldib chk x86 2003      - builds checked x86 version for 2003 using -wg
+echo bldib chk x64 2003      - builds checked x64 version for 2003 using -wg
+echo bldib fre x64 2008 wgc  - builds free    x64 version for 2008 using -wgc
+echo -
+echo Also see docs\build.txt
+
+:end
+endlocal
+ at echo on





More information about the ofw mailing list