mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 08:46:37 +00:00
53c13b15ec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24025 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
536 B
Batchfile
Executable File
23 lines
536 B
Batchfile
Executable File
@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
|