X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=win32%2Fdoflex.cmd;h=8f32fbdaa4a5acd6bfe37726bc7b52e272d3dac7;hb=09652df5fc19b088d8baf43dd7839d9c2fc24980;hp=5c0629d092b319c241641e55380c5a1df5f67b3f;hpb=4ed1de843dddb681b6a868d8acf2cb2f20f70131;p=oota-llvm.git diff --git a/win32/doflex.cmd b/win32/doflex.cmd index 5c0629d092b..8f32fbdaa4a 100755 --- a/win32/doflex.cmd +++ b/win32/doflex.cmd @@ -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