Track dependencies when creating symlinks to LLVM libraries next
[oota-llvm.git] / win32 / doflex.cmd
1 @echo off
2 rem doflex.cmd prefix mode target source
3 rem   mode - either debug or release
4 rem   target - generated parser file name without extension
5 rem   source - input to bison
6
7 if "%1"=="debug" (set flags=-t) else (set flags=-t)
8
9 rem Test for presence of flex.
10 flex --help >NUL
11 if errorlevel 1 goto noflex
12
13 rem Run flex.
14 flex %flags% >%2.cpp %3
15 exit
16
17 :noflex
18 echo Flex not found.  Using pre-generated files.
19 copy %~pn3.cpp.cvs %2.cpp
20 exit