citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 1b5653b3191faca22606e98c2a14b71b726ee3e5
parent b03f7a1191368240f1f4076707139f14beda7ae2
Author: Kyle Milz <kyle@windows.krwm.net>
Date:   Thu,  5 Jan 2017 20:48:15 -0800

configure: improve batch file

- prepend >> Jamrules instead of appending
- check for perl
- only escape each \ with \\ instead of \\\\

Diffstat:
Mconfigure.bat | 84++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
1 file changed, 49 insertions(+), 35 deletions(-)

diff --git a/configure.bat b/configure.bat @@ -2,7 +2,8 @@ REM REM Checks that a bunch of crap is installed and available on Windows. REM -ECHO Configuring C It Run for Windows +ECHO. +ECHO !! Windows configuration script running. ECHO. REM @@ -12,71 +13,84 @@ REM SETLOCAL SET Path=C:\LLVM\bin;%Path% -WHERE cl +REM +REM Check binaries needed for building are available. +REM + +WHERE cl >nul IF %ERRORLEVEL% NEQ 0 ( ECHO cl.exe not found on the Path! - ECHO( + ECHO. ECHO Please make sure Visual Studio is installed and that you're running this ECHO at a developer command prompt with the correct Path set. - EXIT /B 1 ) -WHERE jam +WHERE jam >nul IF %ERRORLEVEL% NEQ 0 ( ECHO jam.exe not found on the Path! - ECHO( - ECHO Jam can be downloaded by this command: + EXIT /B 1 ) -WHERE llvm-config.exe 2>nul +WHERE llvm-config >nul 2>nul IF %ERRORLEVEL% NEQ 0 ( ECHO llvm-config.exe not found on the Path! - ECHO You need to have compiled the LLVM sources by hand to get this - ECHO executable. - ECHO( + ECHO. + ECHO I had to compile LLVM sources to get this executable. + ECHO. ECHO Download LLVM sources from http://llvm.org/. + EXIT /B 1 +) +WHERE perl >nul +IF %ERRORLEVEL% NEQ 0 ( + ECHO Perl not found. + ECHO + ECHO Consider installing Strawberry Perl from + ECHO http://strawberryperl.com EXIT /B 1 ) + SET CLANG_LIBS=clangAST.lib clangAnalysis.lib clangBasic.lib clangDriver.lib clangEdit.lib clangFrontend.lib clangFrontendTool.lib clangLex.lib clangParse.lib clangRewrite.lib clangRewriteFrontend.lib clangSema.lib clangSerialization.lib clangTooling.lib SET LLVM_LIBS=bitreader mcparser transformutils option -DEL Jamrules +DEL Jamrules 2>nul -ECHO C++FLAGS = ; >>Jamrules -ECHO( >>Jamrules +>> Jamrules ECHO C++FLAGS = ; +>> Jamrules ECHO. -ECHO FONT_PATH = "C:\Windows\Fonts\consola.ttf" ; >>Jamrules -ECHO CITRUN_COMPILERS = %CD:\=\\\\%\\\\compilers ; >> Jamrules -ECHO CITRUN_LIB = %CD:\=\\\\%\\\\libcitrun.lib ; >>Jamrules -ECHO( >>Jamrules +>> Jamrules ECHO FONT_PATH = "C:\Windows\Fonts\consola.ttf" ; +>> Jamrules ECHO CITRUN_COMPILERS = %CD:\=\\%\\compilers ; +>> Jamrules ECHO CITRUN_LIB = %CD:\=\\%\\libcitrun.lib ; +>> Jamrules ECHO. REM GL_CFLAGS = `pkg-config --cflags glfw3 glew freetype2` ; REM GL_LIBS = ${GL_EXTRALIB-} `pkg-config --libs glfw3 glew freetype2` ; REM GLTEST_LIBS = `pkg-config --libs osmesa` ; -ECHO INST_CFLAGS = >>Jamrules -ECHO -IC:\\Clang\\include >>Jamrules -llvm-config.exe --cxxflags >>Jamrules -ECHO ; >>Jamrules -ECHO( >>Jamrules +>> Jamrules ECHO INST_CFLAGS = +>> Jamrules ECHO -IC:\\Clang\\include +>> Jamrules llvm-config --cxxflags +>> Jamrules ECHO ; +>> Jamrules ECHO. -ECHO INST_LDFLAGS = >>Jamrules -ECHO -LIBPATH:C:\\Clang\\lib >>Jamrules -llvm-config.exe --ldflags >>Jamrules -ECHO ; >>Jamrules -ECHO( >>Jamrules +>> Jamrules ECHO INST_LDFLAGS = +>> Jamrules ECHO -LIBPATH:C:\\Clang\\lib +>> Jamrules llvm-config --ldflags +>> Jamrules ECHO ; +>> Jamrules ECHO. -ECHO INST_LIBS = >>Jamrules -ECHO %CLANG_LIBS% >>Jamrules -llvm-config.exe --libnames %LLVM_LIBS% >>Jamrules -llvm-config.exe --system-libs >>Jamrules -ECHO shlwapi.lib version.lib ; >>Jamrules -ECHO( >>Jamrules +>> Jamrules ECHO INST_LIBS = +>> Jamrules ECHO %CLANG_LIBS% +>> Jamrules llvm-config --libnames %LLVM_LIBS% +>> Jamrules llvm-config --system-libs +>> Jamrules ECHO shlwapi.lib version.lib ; +>> Jamrules ECHO. -COPY /b Jamrules + Jamrules.tail Jamrules +REM Append Jamrules.tail to generated Jamrules. +COPY /b Jamrules + Jamrules.tail Jamrules >nul ENDLOCAL +ECHO !! Jamrules written, configuration is complete. PAUSE