Added an environment variable test to bypass setting the path multiple times, it...
authorlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 9 Jun 2006 18:07:09 +0000 (18:07 +0000)
committerlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 9 Jun 2006 18:07:09 +0000 (18:07 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@458 6f19259b-4bc3-4df7-8a09-765794883524

edksetup.bat

index 03fe4e6..60c55c4 100644 (file)
@@ -29,8 +29,6 @@
 @REM Check the required system environment variables\r
 @REM\r
 \r
-if "%1"=="skip" goto skipbuild\r
-\r
 :check_vc\r
 if defined VCINSTALLDIR goto check_cygwin\r
 if defined VS71COMNTOOLS (\r
@@ -68,14 +66,29 @@ if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
 set WORKSPACE=%CD%\r
 \r
 set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin\r
-set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%Framework_Tools_Path%;%PATH%\r
+\r
+if defined WORKSPACE_TOOLS_PATH goto check_path\r
+set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%\r
+set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%\r
+echo Setting the PATH variable to include the Framework_Tools_Path for this WORKSPACE\r
+goto path_ok\r
+\r
+:check_path\r
+if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok\r
+set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%\r
+set WORKSPACE_PATH=%WORKSPACE%\r
+echo Resetting the PATH variable to include the Framework_Tools_Path for this WORKSPACE\r
+\r
+:path_ok\r
+\r
+if "%1"=="skip" goto skipbuild\r
 \r
 echo.\r
+echo WORKSPACE:     %WORKSPACE%\r
 echo JAVA_HOME:     %JAVA_HOME%\r
 echo ANT_HOME:      %ANT_HOME%\r
 echo XMLBEANS_HOME: %XMLBEANS_HOME%\r
 echo CYGWIN_HOME:   %CYGWIN_HOME%\r
-echo WORKSPACE:     %WORKSPACE%\r
 echo PATH:          %PATH%\r
 echo.\r
 \r
@@ -155,15 +168,12 @@ goto end
 @REM\r
 @REM This just sets up the CLASSPATH, the rest of the environment should have been set already.\r
 @REM\r
-set WORKSPACE=%CD%\r
-set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin\r
-if exist c:\cygwin set CYGWIN_HOME=c:\cygwin\r
 echo.\r
+echo WORKSPACE:     %WORKSPACE%\r
 echo JAVA_HOME:     %JAVA_HOME%\r
 echo ANT_HOME:      %ANT_HOME%\r
 echo XMLBEANS_HOME: %XMLBEANS_HOME%\r
 echo CYGWIN_HOME:   %CYGWIN_HOME%\r
-echo WORKSPACE:     %WORKSPACE%\r
 echo PATH:          %PATH%\r
 echo.\r
 set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar\r