From 4ed1de843dddb681b6a868d8acf2cb2f20f70131 Mon Sep 17 00:00:00 2001 From: Jeff Cohen Date: Wed, 26 Oct 2005 05:37:34 +0000 Subject: Eliminate need for bison/flex in Visual Studio builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23999 91177308-0d34-0410-b5e6-96231b3b80d8 --- win32/doflex.cmd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 win32/doflex.cmd (limited to 'win32/doflex.cmd') diff --git a/win32/doflex.cmd b/win32/doflex.cmd new file mode 100755 index 0000000000..5c0629d092 --- /dev/null +++ b/win32/doflex.cmd @@ -0,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 -- cgit v1.2.3