[llvm-commits] [vector_llvm] CVS: llvm/win32/dobison.cmd doflex.cmd
Robert Bocchino
bocchino at cs.uiuc.edu
Wed Nov 16 10:33:58 PST 2005
Changes in directory llvm/win32:
dobison.cmd added (r1.2.4.2)
doflex.cmd added (r1.2.4.2)
---
Log message:
Merged mainline into Vector LLVM branch
---
Diffs of the changes: (+42 -0)
dobison.cmd | 22 ++++++++++++++++++++++
doflex.cmd | 20 ++++++++++++++++++++
2 files changed, 42 insertions(+)
Index: llvm/win32/dobison.cmd
diff -c /dev/null llvm/win32/dobison.cmd:1.2.4.2
*** /dev/null Wed Nov 16 12:33:56 2005
--- llvm/win32/dobison.cmd Wed Nov 16 12:33:46 2005
***************
*** 0 ****
--- 1,22 ----
+ @echo off
+ rem dobison.cmd prefix mode target source
+ rem prefix - passed to bison as -p<prefix>
+ rem mode - either debug or release
+ rem target - generated parser file name without extension
+ rem source - input to bison
+
+ if "%2"=="debug" (set flags=-tvdo) else (set flags=-vdo)
+
+ rem Test for presence of bison.
+ bison --help >NUL
+ if errorlevel 1 goto nobison
+
+ rem Run bison.
+ bison -p%1 %flags%%3.cpp %4 && move %3.hpp %3.h
+ exit
+
+ :nobison
+ echo Bison not found. Using pre-generated files.
+ copy %~pn4.cpp %3.cpp
+ copy %~pn4.h %3.h
+ exit
Index: llvm/win32/doflex.cmd
diff -c /dev/null llvm/win32/doflex.cmd:1.2.4.2
*** /dev/null Wed Nov 16 12:33:58 2005
--- llvm/win32/doflex.cmd Wed Nov 16 12:33:46 2005
***************
*** 0 ****
--- 1,20 ----
+ @echo off
+ rem doflex.cmd prefix mode target source
+ rem mode - either debug or release
+ rem target - generated parser file name without extension
+ rem source - input to bison
+
+ if "%1"=="debug" (set flags=-t) else (set flags=-t)
+
+ rem Test for presence of flex.
+ flex --help >NUL
+ if errorlevel 1 goto noflex
+
+ rem Run flex.
+ flex %flags% >%2.cpp %3
+ exit
+
+ :noflex
+ echo Flex not found. Using pre-generated files.
+ copy %~pn3.cpp %2.cpp
+ exit
More information about the llvm-commits
mailing list