diff --git a/win32/AsmParser/.cvsignore b/win32/AsmParser/.cvsignore new file mode 100644 index 00000000000..997ad1c9f0f --- /dev/null +++ b/win32/AsmParser/.cvsignore @@ -0,0 +1,4 @@ +Lexer.cpp +llvmAsmParser.cpp +llvmAsmParser.h +llvmAsmParser.output diff --git a/win32/AsmParser/AsmParser.vcproj b/win32/AsmParser/AsmParser.vcproj index 36c34293676..48162fd22b1 100644 --- a/win32/AsmParser/AsmParser.vcproj +++ b/win32/AsmParser/AsmParser.vcproj @@ -20,7 +20,7 @@ + CommandLine="..\doflex.cmd debug $(InputName) $(InputPath)" + Outputs="$(InputName).cpp"/> + CommandLine="..\doflex.cmd release $(InputName) $(InputPath)" + Outputs="$(InputName).cpp"/> + Outputs="$(InputName).cpp;$(InputName).h"/> + Outputs="$(InputName).cpp;$(InputName).h"/> + RelativePath="Lexer.cpp"> + RelativePath="llvmAsmParser.cpp"> + RelativePath="llvmAsmParser.h"> diff --git a/win32/TableGen/.cvsignore b/win32/TableGen/.cvsignore new file mode 100644 index 00000000000..233e1abe5ba --- /dev/null +++ b/win32/TableGen/.cvsignore @@ -0,0 +1,4 @@ +FileLexer.cpp +FileParser.cpp +FileParser.h +FileParser.output diff --git a/win32/TableGen/TableGen.vcproj b/win32/TableGen/TableGen.vcproj index f23af0e8a49..1c0012a3cf0 100644 --- a/win32/TableGen/TableGen.vcproj +++ b/win32/TableGen/TableGen.vcproj @@ -19,7 +19,7 @@ + CommandLine="..\doflex.cmd debug $(InputName) $(InputPath)" + Outputs="$(InputName).cpp"/> + CommandLine="..\doflex.cmd release $(InputName) $(InputPath)" + Outputs="$(InputName).cpp"/> + Outputs="$(InputName).cpp;$(InputName).h"/> + Outputs="$(InputName).cpp;$(InputName).h"/> + RelativePath="FileLexer.cpp"> + RelativePath="fileparser.cpp"> + RelativePath="fileparser.h"> diff --git a/win32/dobison.cmd b/win32/dobison.cmd new file mode 100755 index 00000000000..c49ae2f3386 --- /dev/null +++ b/win32/dobison.cmd @@ -0,0 +1,22 @@ +@echo off +rem dobison.cmd prefix mode target source +rem prefix - passed to bison as -p +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 diff --git a/win32/doflex.cmd b/win32/doflex.cmd new file mode 100755 index 00000000000..5c0629d092b --- /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