anchor.diff:  @MD %abi%
   @set dxtn=gcc -shared
   @if %abi%==x86 set dxtn=%dxtn% -m32
  -@set dxtn=%dxtn% -v *.c *.h -I ..\mesa\include -Wl,--dll,--dynamicbase,--enable-auto-image-base,--nxcompat -o %abi%\dxtn.dll
  +@set dxtn=%dxtn% -v *.c *.h -I ../mesa/include -Wl,--dll,--dynamicbase,--enable-auto-image-base,--nxcompat -o %abi%/dxtn.dll
   @echo.
   @%dxtn%
   @echo.
  
positive.code: @if %abi%==x64 @set altabi=%longabi%
  @set minabi=32
  @if %abi%==x64 set minabi=64
  @if "%ProgramW6432%"=="" set vsenv=%ProgramFiles%
  @if NOT "%ProgramW6432%"=="" set vsenv=%ProgramFiles% (x86)
  @if %abi%==x86 set gcc=%vsenv%
  @if %abi%==x64 set gcc=%ProgramFiles%
  @set vsenv="%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\
  @if %abi%==x86 set vsenv=%vsenv%\vcvars32.bat"
  @if %abi%==x64 set vsenv=%vsenv%\vcvars64.bat"
  @call %vsenv%
  
  @if %abi%==x86 set gcc=%gcc%\mingw-w64\%altabi%-%x86gcc%-%x86threading%-%x86except%-rt_v%x86mingwver%-rev%x86mingwrev%
  @if %abi%==x64 set gcc=%gcc%\mingw-w64\%altabi%-%x64gcc%-%x64threading%-%x64except%-rt_v%x64mingwver%-rev%x64mingwrev%
  
  @set PATH=%mesa%flexbison\;%mesa%m4\%abi%\bin\;%mesa%Python\%abi%\;%mesa%Python\%abi%\Scripts\;%mesa%cmake\%abi%\bin\;%PATH%
  @if EXIST "%gcc%" set PATH=%gcc%\mingw%minabi%\bin\;%PATH%
  
  @pip install -U mako
  @pip freeze > requirements.txt
  
negative.code: :build_mesa
  @set /p buildmesa=Begin mesa build. Proceed (y/n):
  @if /i NOT %buildmesa%==y GOTO exit
  @set LLVM=%mesa%llvm/%abi%
  @cd %mesa%mesa
  @set mingw=n
  @rem if EXIST "%gcc%" set /p mingw=Do you want to build with MinGW-W64 instead of Visual Studio? (y=yes):
  @set buildmingw=
  @if /i %mingw%==y (
  @set buildmingw=toolchain=crossmingw
  @mklink /H "%gcc%/%altabi%-w64-mingw32-ar.exe" "%gcc%/ar.exe"
  @mklink /H "%gcc%/%altabi%-w64-mingw32-ranlib.exe" "%gcc%/ranlib.exe"
  )
  @if /i NOT %mingw%==y (
  @if NOT %vsenvloaded==1 (
  @call "%vsenv%"
  )
  )
  @set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
  @set buildswr=
  @if /i %openswr%==y @set buildswr=swr=1
  