mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
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
This commit is contained in:
parent
3fd24bd61f
commit
4ed1de843d
4
win32/AsmParser/.cvsignore
Normal file
4
win32/AsmParser/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
||||
Lexer.cpp
|
||||
llvmAsmParser.cpp
|
||||
llvmAsmParser.h
|
||||
llvmAsmParser.output
|
@ -20,7 +20,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;.."
|
||||
AdditionalIncludeDirectories="..\..\include;..;..\..\lib\AsmParser"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -65,7 +65,7 @@
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;.."
|
||||
AdditionalIncludeDirectories="..\..\include;..;..\..\lib\AsmParser"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
|
||||
RuntimeLibrary="2"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
@ -114,16 +114,16 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Flexing $(InputFileName)"
|
||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)"
|
||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
||||
CommandLine="..\doflex.cmd debug $(InputName) $(InputPath)"
|
||||
Outputs="$(InputName).cpp"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Flexing $(InputFileName)"
|
||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)"
|
||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
||||
CommandLine="..\doflex.cmd release $(InputName) $(InputPath)"
|
||||
Outputs="$(InputName).cpp"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
@ -133,20 +133,18 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Bisoning $(InputFileName)"
|
||||
CommandLine="..\tools\bison -pllvmAsm -tvdo$(InputDir)$(InputName).cpp $(InputPath)
|
||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
CommandLine="..\dobison.cmd llvmAsm debug $(InputName) $(InputPath)
|
||||
"
|
||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
||||
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Bisoning $(InputFileName)"
|
||||
CommandLine="..\tools\bison -pllvmAsm -vdo$(InputDir)$(InputName).cpp $(InputPath)
|
||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
CommandLine="..\dobison.cmd llvmAsm release $(InputName) $(InputPath)
|
||||
"
|
||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
||||
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
@ -168,13 +166,13 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
Name="Generated Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\lib\AsmParser\Lexer.cpp">
|
||||
RelativePath="Lexer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\lib\AsmParser\llvmAsmParser.cpp">
|
||||
RelativePath="llvmAsmParser.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\lib\AsmParser\llvmAsmParser.h">
|
||||
RelativePath="llvmAsmParser.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
|
4
win32/TableGen/.cvsignore
Normal file
4
win32/TableGen/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
||||
FileLexer.cpp
|
||||
FileParser.cpp
|
||||
FileParser.h
|
||||
FileParser.output
|
@ -19,7 +19,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;.."
|
||||
AdditionalIncludeDirectories="..\..\include;..;..\..\utils\tablegen"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__STDC_LIMIT_MACROS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -72,7 +72,7 @@
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;.."
|
||||
AdditionalIncludeDirectories="..\..\include;..;..\..\utils\tablegen"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;__STDC_LIMIT_MACROS"
|
||||
RuntimeLibrary="2"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
@ -142,18 +142,16 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Flexing $(InputFileName)"
|
||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)
|
||||
"
|
||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
||||
CommandLine="..\doflex.cmd debug $(InputName) $(InputPath)"
|
||||
Outputs="$(InputName).cpp"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Flexing $(InputFileName)"
|
||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)
|
||||
"
|
||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
||||
CommandLine="..\doflex.cmd release $(InputName) $(InputPath)"
|
||||
Outputs="$(InputName).cpp"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
@ -163,20 +161,18 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Bisoning $(InputFileName)"
|
||||
CommandLine="..\tools\bison -pFile -tvdo$(InputDir)$(InputName).cpp $(InputPath)
|
||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
CommandLine="..\dobison.cmd File debug $(InputName) $(InputPath)
|
||||
"
|
||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
||||
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Bisoning $(InputFileName)"
|
||||
CommandLine="..\tools\bison -pFile -vdo$(InputDir)$(InputName).cpp $(InputPath)
|
||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
CommandLine="..\dobison.cmd File release $(InputName) $(InputPath)
|
||||
"
|
||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
||||
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
@ -240,7 +236,7 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
Name="Generated Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\utils\TableGen\FileLexer.cpp">
|
||||
RelativePath="FileLexer.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
@ -255,7 +251,7 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\utils\TableGen\fileparser.cpp">
|
||||
RelativePath="fileparser.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
@ -270,7 +266,7 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\utils\TableGen\fileparser.h">
|
||||
RelativePath="fileparser.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
|
22
win32/dobison.cmd
Executable file
22
win32/dobison.cmd
Executable file
@ -0,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
|
19
win32/doflex.cmd
Executable file
19
win32/doflex.cmd
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user