anchor.diff:  @if /I "%1"=="/h" goto Usage
   @if /I "%1"=="/?" goto Usage
   @if /I "%1"=="/help" goto Usage
  +@if /I not "%1"=="--nt32" goto check_new_build
  +shift
  +goto check_vc
  +
  +:check_new_build
  +@if /I "%1"=="NewBuild" goto NewBuild
  +
  +:AntBuild
  +@REM
  +@REM Check the required system environment variables
  +@REM
  +
  +:check_vc
  +if defined VCINSTALLDIR goto check_cygwin
  +if defined VS71COMNTOOLS (
  + call "%VS71COMNTOOLS%\vsvars32.bat"
  +) else (
  +  echo.
  +  echo !!! WARNING !!!! Cannot find Visual Studio !!!
  +  echo.
  +)
  +goto check_new_build
  +
  +:check_cygwin
  +if defined CYGWIN_HOME goto check_java
  +if exist c:\cygwin (
  +  set CYGWIN_HOME=c:\cygwin
  +) else (
  +  echo.
  +  echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!
  +  echo.
  +)
  +
  +:check_java
  +if "%JAVA_HOME%"=="" goto no_jdk
  +
  +:check_ant
  +if "%ANT_HOME%"=="" goto no_ant
  +if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib
  +
  +:check_xmlbeans
  +if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
  +if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
  +
  +set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin
  +
  +if not defined ORIGINAL_CLASSPATH set ORIGINAL_CLASSPATH=%CLASSPATH%
  +set CLASSPATH=%ORIGINAL_CLASSPATH%
  +
  +if defined WORKSPACE_TOOLS_PATH goto check_path
  +set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%
  +set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%
  +echo Setting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WORKSPACE
  +goto path_ok
  +
  +:check_path
  +if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
  +set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
  +set WORKSPACE_TOOLS_PATH=%WORKSPACE%\Tools\bin
  +echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WORKSPACE
  +
  +:path_ok
  +
   @if /I "%1"=="ForceRebuild" goto ForceBuild
   @if /I "%1"=="Reconfig" goto Reconfig
   
  
positive.code: 
  :Usage
  echo.
  echo  Usage: %0 [Rebuild] [ForceRebuild] [Reconfig]
  echo         Rebuild:       Incremental build, only build those updated tools; 
  echo         ForceRebuild:  Rebuild all tools neither updated or not; 
  echo         Reconfig:      Reinstall target.txt, tools_def.txt, FrameworkDatabase.db. 
  
negative.code: echo  only copied to target.txt, tools_def.txt, FrameworkDatabase.db respectively if they
  echo  are not existed. Using option [Reconfig] to do the force copy. 
  echo.
  @goto end
  
  :NewBuild
  @IF NOT EXIST "BaseTools\toolsetup.bat" goto AntBuild
  