]> git.proxmox.com Git - mirror_edk2.git/blobdiff - edksetup.bat
Clean up DEC files:
[mirror_edk2.git] / edksetup.bat
index d81e7fd5edd300b75a6258b67dc4db826adcbeb5..31aa4719c410974ee43836072f73690ec2371224 100755 (executable)
@@ -1,8 +1,8 @@
 @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