anchor.diff:  ::
   :: Generates tfenv.bat
   ::
  +set BASEDIR=%~dp0
   for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
   for %%I in (cmake.exe) do if exist %%~$path:I set CMAKE=%%~$path:I
   for %%I in (cl.exe)    do if exist %%~$path:I set MSCOMPILER=%%~$path:I
  
positive.code: if not "%MSCOMPILER%" == "" (
    for /F %%i in ('qtpaths.exe --install-prefix') do echo %%i | find "msvc2015" >NUL
    if not ERRORLEVEL 1 (
      devenv lz4\visual\VS2015\lz4.sln /project liblz4 /rebuild "Release|%BUILDTARGET%"
    ) else (
      devenv lz4\visual\VS2017\lz4.sln /project liblz4 /rebuild "Release|%BUILDTARGET%"
    )
    if ERRORLEVEL 1 (
      echo Build failed.
  
negative.code:     exit /b
    )
  ) else (
    cd %BASEDIR%3rdparty\lz4\lib
    qmake -o makefile.liblz4
    %MAKE% -f makefile.liblz4 clean >nul 2>&1
    %MAKE% -f makefile.liblz4 >nul 2>&1
  )
  
  cd %BASEDIR%src
  if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
  qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI%
  
  cd %BASEDIR%tools
  if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
  qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%'
  %MAKE% qmake
  
  echo;
  echo First, run "%MAKE% install" in src directory.
  