[llvm-commits] CVS: llvm/win32/dobison.cmd doflex.cmd
Jeff Cohen
jeffc at jolt-lang.org
Tue Oct 25 22:37:47 PDT 2005
Changes in directory llvm/win32:
dobison.cmd added (r1.1)
doflex.cmd added (r1.1)
---
Log message:
Eliminate need for bison/flex in Visual Studio builds.
---
Diffs of the changes: (+41 -0)
dobison.cmd | 22 ++++++++++++++++++++++
doflex.cmd | 19 +++++++++++++++++++
2 files changed, 41 insertions(+)
Index: llvm/win32/dobison.cmd
diff -c /dev/null llvm/win32/dobison.cmd:1.1
*** /dev/null Wed Oct 26 00:37:45 2005
--- llvm/win32/dobison.cmd Wed Oct 26 00:37:35 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 Try and run bison. If it is present, great.
+ bison -p%1 %flags%%3.cpp %4
+ if errorlevel 1 goto error
+ move %3.hpp %3.h
+ goto done
+
+ :error
+ echo Bison could not run. Using pre-generated files.
+ copy %~pn4.cpp %3.cpp
+ copy %~pn4.h %3.h
+
+ :done
+ exit 0
Index: llvm/win32/doflex.cmd
diff -c /dev/null llvm/win32/doflex.cmd:1.1
*** /dev/null Wed Oct 26 00:37:47 2005
--- llvm/win32/doflex.cmd Wed Oct 26 00:37:35 2005
***************
*** 0 ****
--- 1,19 ----
+ @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 Try and run flex. If it is present, great.
+ flex %flags% >%2.cpp %3
+ if errorlevel 1 goto error
+ goto done
+
+ :error
+ echo Flex could not run. Using pre-generated files.
+ copy %~pn3.cpp %2.cpp
+
+ :done
+ exit 0
More information about the llvm-commits
mailing list