From 80d6b0e9ca3c58d33d17c07f14744e8425864d8f Mon Sep 17 00:00:00 2001 From: apense Date: Wed, 17 Jun 2015 13:07:38 -0400 Subject: [PATCH] Fixed gcc batch issue See #18 on csources. Basically, some Windows system have gcc as a gcc.bat file. This isn't an issue unless you're calling from another batch file (like here). The call chain will follow to gcc.bat and end there, meaning only one command is processed. Using "CALL" before the other batch command will keep the calls in the main batch file after completion, meaning the compilation will actually succeed this way [see technet](https://technet.microsoft.com/en-us/library/bb490873.aspx). Otherwise you have to hope there is a gcc.exe somewhere instead --- tools/niminst/buildbat.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/niminst/buildbat.tmpl b/tools/niminst/buildbat.tmpl index 3a11715bfd..2c6a2b5a80 100644 --- a/tools/niminst/buildbat.tmpl +++ b/tools/niminst/buildbat.tmpl @@ -18,13 +18,13 @@ REM call the compiler: # for ff in items(c.cfiles[winIndex][cpuIndex]): # let f = ff.toWin ECHO %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")} -%CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")} +CALL %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")} # linkCmd.add(" " & changeFileExt(f, "o")) IF ERRORLEVEL 1 (GOTO:END) # end for ECHO %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS% -%LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS% +CALL %LINKER% -o ?{"%BIN_DIR%"\toLower(c.name)}.exe ?linkCmd %LINK_FLAGS% # end block