@REM @file\r
@REM Windows batch file to setup a WORKSPACE environment\r
@REM\r
-@REM Copyright (c) 2006 - 2008, Intel Corporation\r
-@REM All rights reserved. This program and the accompanying materials\r
+@REM Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+@REM This program and the accompanying materials\r
@REM are licensed and made available under the terms and conditions of the BSD License\r
@REM which accompanies this distribution. The full text of the license may be found at\r
@REM http://opensource.org/licenses/bsd-license.php\r
@REM\r
pushd .\r
cd %~dp0\r
+\r
+if not defined WORKSPACE (\r
+ @goto SetWorkSpace\r
+)\r
+\r
+if %WORKSPACE% == %CD% (\r
+ @REM Workspace is not changed.\r
+ @goto ParseArgs\r
+)\r
+\r
+:SetWorkSpace\r
+@REM set new workspace\r
+@REM clear EFI_SOURCE and EDK_SOURCE for the new workspace\r
set WORKSPACE=%CD%\r
+set EFI_SOURCE=\r
+set EDK_SOURCE=\r
\r
+:ParseArgs\r
@if /I "%1"=="-h" goto Usage\r
@if /I "%1"=="-help" goto Usage\r
@if /I "%1"=="--help" goto Usage\r