anchor.diff:  :SHOWHELP
   TITLE "build.cmd %1"
   ECHO.
  -ECHO:Usage:  build.cmd [Clean^|Build^|Rebuild]
  +ECHO:Usage:  build.cmd [Clean^|Build^|Rebuild] [x86^|x64^|all]
   ECHO.
   ECHO:Edit "build.cmd" and set your WDK and SDK directories.
   ECHO:You shouldn't need to make any changes other than that.
   ECHO.
  -ECHO:Executing "build.cmd" will use the defaults: "build.bat Build"
  +ECHO:Executing "build.cmd" will use the defaults: "build.bat build all"
   ECHO.
   ENDLOCAL
   EXIT /B
  
positive.code: EXIT /B
  
  
  :SUBNMAKEx86
  nmake /NOLOGO /f "makefile.mak" %1
  IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
  EXIT /B
  
  :SUBNMAKEx64
  nmake /NOLOGO /f "makefile.mak" x64=1 %1
  IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
  EXIT /B
  
  
negative.code: SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\x86;%SDKDIR%\Bin"
  SET "PATH=%FPATH%"
  
  IF /I "%ARCH%" == "x64" GOTO :x64
  
  TITLE Building Notepad2 x86...
  ECHO. && ECHO.
  
  IF /I "%BUILDTYPE%" == "Build" (
  CALL :SUBNMAKE
  IF /I "%ARCH%" == "x86" GOTO :END
  IF /I "%ARCH%" == "x64" GOTO :x64
  IF /I "%ARCH%" == "all" GOTO :x64
  )
  
  IF /I "%BUILDTYPE%" == "Rebuild" (
  CALL :SUBNMAKE clean
  CALL :SUBNMAKE
  IF /I "%ARCH%" == "x86" GOTO :END
  IF /I "%ARCH%" == "x64" GOTO :x64
  IF /I "%ARCH%" == "all" GOTO :x64
  )
  
  IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE clean
  IF /I "%ARCH%" == "x86" GOTO :END
  IF /I "%ARCH%" == "x64" GOTO :x64
  IF /I "%ARCH%" == "all" GOTO :x64
  
  :x64
  SET "LIB=%WDKBASEDIR%\lib\crt\amd64;%WDKBASEDIR%\lib\win7\amd64"
  SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\amd64;%SDKDIR%\Bin"
  SET "PATH=%FPATH%"
  
  IF /I "%ARCH%" == "x86" GOTO :END
  
  TITLE Building Notepad2 x64...
  ECHO. && ECHO.
  
  IF /I "%BUILDTYPE%" == "Build" (
  CALL :SUBNMAKE "x64=1"
  GOTO :END
  )
  
  IF /I "%BUILDTYPE%" == "Rebuild" (
  CALL :SUBNMAKE "x64=1" clean
  CALL :SUBNMAKE "x64=1"
  GOTO :END
  )
  
  IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE "x64=1" clean
  
  
  :END
  