Oops. Debugging code shouldn't have been checked in.
[oota-llvm.git] / win32 / doflex.cmd
index 5c0629d092b319c241641e55380c5a1df5f67b3f..8f32fbdaa4a5acd6bfe37726bc7b52e272d3dac7 100755 (executable)
@@ -6,14 +6,15 @@ rem   source - input to bison
 
 if "%1"=="debug" (set flags=-t) else (set flags=-t)
 
-rem Try and run flex.  If it is present, great.
-flex %flags% >%2.cpp %3
-if errorlevel 1 goto error
-goto done
+rem Test for presence of flex.
+flex --help >NUL
+if errorlevel 1 goto noflex
 
-:error
-echo Flex could not run.  Using pre-generated files.
-copy %~pn3.cpp %2.cpp
+rem Run flex.
+flex %flags% >%2.cpp %3
+exit
 
-:done
-exit 0
+:noflex
+echo Flex not found.  Using pre-generated files.
+copy %~pn3.cpp.cvs %2.cpp
+exit