Added an environment variable test to bypass setting the path multiple times, it checks the FRAMEWORK_TOOLS_PATH to make sure that it has not changed. If it has, it prepends the new FRAMEWORK_TOOLS_PATH setting to the PATH environment variable.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@458 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lhauch 2006-06-09 18:07:09 +00:00
parent 8742c000dc
commit 6de5f959d6
1 changed files with 18 additions and 8 deletions

View File

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