anchor.diff:      @echo.
       goto end
     )
  -
  -:VisualStudioAvailable
     if not defined FORCE_REBUILD goto IncrementalBuild
   
   :CleanAndBuild
  
positive.code:        set BASE_TOOLS_PATH=%CD%
       )
    )
    set PATH=%BASE_TOOLS_PATH%\Bin\Win32;%PATH%
  
    set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python
    set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%
  
    if not defined PYTHON_HOME (
      if defined PYTHONHOME (
        set PYTHON_HOME=%PYTHONHOME%
      ) else (
        echo.
        echo  !!! ERROR !!! PYTHON_HOME is required to build or execute the tools, please set it. !!!
        echo.
        goto end
      )
  
negative.code: if defined REBUILD goto check_build_environment
  if not exist "%EDK_TOOLS_PATH%" goto check_build_environment
  
  IF NOT EXIST "%EDK_TOOLS_BIN%\BootSectImage.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\EfiLdrImage.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\EfiRom.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenBootSector.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenFfs.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenFv.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenFw.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenPage.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenSec.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenVtf.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\Split.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\TianoCompress.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\VfrCompile.exe" goto check_c_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\VolInfo.exe" goto check_c_tools
  
  goto check_python_tools
  
  :check_c_tools
    echo.
    echo !!! ERROR !!! Binary C tools are missing. They are requried to be built from BaseTools Source.
    echo.
    goto end
  
  :check_python_tools
  IF NOT EXIST "%EDK_TOOLS_BIN%\build.exe" goto check_build_environment
  IF NOT EXIST "%EDK_TOOLS_BIN%\GenFds.exe" goto check_build_environment
  IF NOT EXIST "%EDK_TOOLS_BIN%\TargetTool.exe" goto check_build_environment
  IF NOT EXIST "%EDK_TOOLS_BIN%\Trim.exe" goto check_build_environment
  
  goto end
  
  :check_build_environment
    if defined BASETOOLS_PYTHON_SOURCE goto VisualStudioAvailable
  
    if not defined BASE_TOOLS_PATH (
       if not exist "Source\C\Makefile" (
  