6 :: If this batch file is run directly thru cygwin, we will get the wrong
7 :: version of python. To avoid this, if we detect cygwin, we need to then
8 :: invoke the shell script which will then re-invoke this batch file with
9 :: cygwin stripped out of the path.
10 :: Detect cygwin by trying to run bash.
11 bash --version >NUL 2>&1
12 if %ERRORLEVEL% == 0 (
17 :: Preserve a copy of the PATH (in case we need it later, mainly for cygwin).
18 set PRESCONS_PATH=%PATH%
20 :: Set the PYTHONPATH so we can import SCons modules
21 set PYTHONPATH=%~dp0..\third_party\scons\scons-local;%PYTHONPATH%
23 :: Add gnu_binutils to the path
24 set PATH=%PATH%;%~dp0..\third_party\gnu_binutils\files
26 :: Run the included copy of scons.
27 python -O -OO "%~dp0\..\third_party\scons\scons.py" %*