anchor.diff:  GOTO end
   
   :clean
  -RMDIR /S /Q htmlcov .coverage
  -DEL /S *.pyc *~ @* *.orig *.rej #*#
  +RMDIR /S /Q htmlcov .coverage > NUL 2>&1
  +DEL /S *.pyc *~ @* *.orig *.rej #*# > NUL 2>&1
   GOTO end
   
   :trim
  
positive.code: REM  - PYTHON25, PYTHON26, PYTHON27: same as PYTHON but for individual versions
  REM  - PYTHONFLAGS: flags to pass python, defaults to -Wignore
  REM  - PYTHONFLAGS25, PYTHONFLAGS26, PYTHONFLAGS27: same as PYTHONFLAGS but for
  REM													individual versions
  REM  - GAE: path to the google_appengine directory
  REM  - FLAGS: flags to pass either python.exe or dev_appserver.py/appcfg.py
  REM  - PORT: port number for development server to use
  
negative.code: IF "%PORT%"=="" SET PORT=8080
  IF "%ADDRESS%"=="" SET ADDRESS=localhost
  
  :findtarget
  SET TEST_TARGETS=(key, model, query, rpc, eventloop, tasklets, context, thread)
  FOR %%A IN %TEST_TARGETS% DO IF /I "%TARGET%"=="%%A_test" GOTO runtest
  SET RUNTESTS_TARGETS=(test, runtest, runtests)
  FOR %%A IN %RUNTESTS_TARGETS% DO IF /I "%TARGET%"=="%%A" GOTO runtests
  REM TODO: Implement coverage
  SET COVERAGE_TARGETS%=(c, cov, cove, cover, coverage)
  FOR %%A IN %COVERAGE_TARGETS% DO IF /I "%TARGET%"=="%%A" GOTO unimplemented
  IF /I "%TARGET%"=="serve" GOTO serve
  IF /I "%TARGET%"=="debug" GOTO debug
  IF /I "%TARGET%"=="deploy" GOTO deploy
  SET BENCH_TARGETS%=(bench, keybench)
  FOR %%A IN %BENCH_TARGETS% DO IF /I "%TARGET%"=="%%A" GOTO bench
  IF /I "%TARGET%"=="python" GOTO python
  IF /I "%TARGET%"=="python_raw" GOTO pythonraw
  REM TODO: Implement zip
  IF /I "%TARGET%"=="zip" GOTO unimplemented
  IF /I "%TARGET%"=="clean" GOTO clean
  SET LONGLINES_TARGETS%=(long, longline, longlines)
  FOR %%A IN %LONGLINES_TARGETS% DO IF /I "%TARGET%"=="%%A" GOTO longlines
  SET TRIM_TARGETS%=(tr, trim, trim_whitespace)
  FOR %%A IN %TRIM_TARGETS% DO IF /I "%TARGET%"=="%%A" GOTO trim
  IF "%TARGET%"=="" (
    ECHO Must specify a make target e.g. serve
  ) ELSE (
    IF NOT EXIST %TARGET% (
      ECHO Invalid target %TARGET%
    ) ELSE (
      CALL %PYTHON% %PYTHONFLAGS% %TARGET% %FLAGS%
    )
  )
  GOTO end
  
  :runtest
  IF "%VERSION%"=="25" (
    ECHO %TARGET% only supports Python 2.6 or above due to relative imports
    ECHO Note that the runtests target can perform this test using Python 2.5
  ) ELSE (
    CALL %PYTHON% %PYTHONFLAGS% -m ndb.%TARGET% %FLAGS%
  )
  GOTO end
  
  :runtests
  CALL %PYTHON% %PYTHONFLAGS% runtests.py %FLAGS%
  GOTO end
  
  :debug
  