comparison scripts/miscellaneous/mkoctfile.m @ 28020:eb46a9f47164 stable release-5-2-0

Avoid color changes in MS Windows GUI terminal (bug #57658). * scripts/miscellaneous/mkoctfile.m: Add the gcc compiler flag "-fdiagnostics-color=never" in case of MS Windows and the GUI is running. For the MS Windows CLI version the output looks very nice. Update year.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Tue, 28 Jan 2020 10:57:35 +0900
parents 86bcab2e371e
children 8933b2985dd5
comparison
equal deleted inserted replaced
28017:f6b390541a37 28020:eb46a9f47164
1 ## Copyright (C) 2006-2019 Keith Goodman 1 ## Copyright (C) 2006-2020 Keith Goodman
2 ## 2 ##
3 ## This file is part of Octave. 3 ## This file is part of Octave.
4 ## 4 ##
5 ## Octave is free software: you can redistribute it and/or modify it 5 ## Octave is free software: you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by 6 ## under the terms of the GNU General Public License as published by
207 if (! exist (shell_script, "file")) 207 if (! exist (shell_script, "file"))
208 __gripe_missing_component__ ("mkoctfile", "mkoctfile"); 208 __gripe_missing_component__ ("mkoctfile", "mkoctfile");
209 endif 209 endif
210 210
211 cmd = ['"' shell_script '"']; 211 cmd = ['"' shell_script '"'];
212 if (ispc () && isguirunning ())
213 ## FIXME: Remove this branch when the MS Windows GUI terminal widget can
214 ## properly handle colors (bug #57658).
215 cmd = [cmd ' "-fdiagnostics-color=never"'];
216 endif
212 for i = 1:nargin 217 for i = 1:nargin
213 cmd = [cmd ' "' varargin{i} '"']; 218 cmd = [cmd ' "' varargin{i} '"'];
214 endfor 219 endfor
215 220
216 [sys, out] = system (cmd); 221 [sys, out] = system (cmd);