X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=edksetup.bat;h=c32755a471dc960a8784f6f24dbc083897a582d5;hp=6c8c0aa97f4cde347aa4647ef7d9ca1e3d621329;hb=b048a2204db99c61784b5027c8ade18c4fe6be6d;hpb=92063b0b212ddc408dff163ede8e4ae36ba89400 diff --git a/edksetup.bat b/edksetup.bat index 6c8c0aa97f..c32755a471 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -14,10 +14,10 @@ @REM set CYGWIN_HOME=C:\cygwin -@REM usage: +@REM usage: @REM edksetup.bat [--nt32] [AntBuild] [Rebuild] [ForceRebuild] [Reconfig] @REM if the argument, skip is present, only the paths and the -@REM test and set of environment settings are performed. +@REM test and set of environment settings are performed. @REM ############################################################## @REM # You should not have to modify anything below this line @@ -59,27 +59,39 @@ if /I "%1"=="/help" goto Usage if /I "%1"=="NewBuild" shift if not defined EDK_TOOLS_PATH ( - if exist %WORKSPACE%\BaseTools ( - set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools - ) else ( - if defined PACKAGES_PATH ( - for %%i IN (%PACKAGES_PATH%) DO ( - if exist %%~fi\BaseTools ( - set EDK_TOOLS_PATH=%%~fi\BaseTools - goto checkNt32Flag - ) + goto SetEdkToolsPath +) else ( + goto checkNt32Flag +) + +:SetEdkToolsPath +if %WORKSPACE:~-1% EQU \ ( + @set EDK_BASETOOLS=%WORKSPACE%BaseTools +) else ( + @set EDK_BASETOOLS=%WORKSPACE%\BaseTools +) +if exist %EDK_BASETOOLS% ( + set EDK_TOOLS_PATH=%EDK_BASETOOLS% + set EDK_BASETOOLS= +) else ( + if defined PACKAGES_PATH ( + for %%i IN (%PACKAGES_PATH%) DO ( + if exist %%~fi\BaseTools ( + set EDK_TOOLS_PATH=%%~fi\BaseTools + goto checkNt32Flag ) - ) else ( - echo. - echo !!! ERROR !!! Cannot find BaseTools !!! - echo. - goto BadBaseTools ) + ) else ( + echo. + echo !!! ERROR !!! Cannot find BaseTools !!! + echo. + goto BadBaseTools ) ) -if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH% :checkNt32Flag +if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH% + @REM The Nt32 Emluation Platform requires Microsoft Libraries @REM and headers to interface with Windows. if /I "%1"=="--nt32" ( @@ -140,11 +152,13 @@ if defined CYGWIN_HOME ( ) :cygwin_done +if /I "%1"=="Rebuild" shift +if /I "%1"=="ForceRebuild" shift if "%1"=="" goto end :Usage @echo. - @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [--nt32 [X64]] [Reconfig]" + @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [--nt32 [X64]] [Reconfig] [Rebuild] [ForceRebuild]" @echo --nt32 [X64] If a compiler tool chain is not available in the @echo environment, call a script to attempt to set one up. @echo This flag is only required if building the @@ -156,6 +170,8 @@ if "%1"=="" goto end @echo rebuild. @echo. @echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt. + @echo Rebuild Perform incremental rebuild of BaseTools binaries. + @echo ForceRebuild Force a full rebuild of BaseTools binaries. @echo. @echo Note that target.template, tools_def.template and build_rules.template @echo will only be copied to target.txt, tools_def.txt and build_rule.txt @@ -165,4 +181,3 @@ if "%1"=="" goto end :end popd -