]> git.proxmox.com Git - mirror_edk2.git/blobdiff - edksetup.bat
Clean up DEC files:
[mirror_edk2.git] / edksetup.bat
index 4412ac27ed0fbb4e47d5fdf050774ddae7fe0730..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
@@ -51,9 +67,13 @@ if not defined VCINSTALLDIR (
     if defined VS80COMNTOOLS (\r
       call "%VS80COMNTOOLS%\vsvars32.bat"\r
     ) else (\r
-      echo.\r
-      echo !!! WARNING !!! Cannot find Visual Studio !!!\r
-      echo.\r
+      if defined VS90COMNTOOLS (\r
+        call "%VS90COMNTOOLS%\vsvars32.bat"\r
+      ) else (\r
+        echo.\r
+        echo !!! WARNING !!! Cannot find Visual Studio !!!\r
+        echo.\r
+      )\r
     )\r
   )\r
 )\r