Allow disabling colors in configure.py (no bug, r=me).
Allow disabling colors in configure.py (no bug, r=me).
1.1 --- a/ambuild2/frontend/prep.py Sat Feb 01 17:04:02 2014 -0800
1.2 +++ b/ambuild2/frontend/prep.py Sat Feb 01 17:15:39 2014 -0800
1.3 @@ -34,6 +34,8 @@
1.4 help="List available build system generators, then exit.")
1.5 self.options.add_option("--make-scripts", action="store_true", dest="make_scripts", default=False,
1.6 help="Generate extra command-line files for building (build.py, Makefile).")
1.7 + self.options.add_option("--no-color", action="store_true", dest="no_color", default=False,
1.8 + help="Disable color output in the terminal.")
1.9
1.10 @staticmethod
1.11 def default_build_folder(prep):
1.12 @@ -54,9 +56,11 @@
1.13 if options.list_gen:
1.14 print('Available build system generators:')
1.15 print(' {0:24} - AMBuild 2 (default)'.format('ambuild2'))
1.16 - #print(' {0:24} - Visual Studio project files'.format('vcxproj'))
1.17 sys.exit(0)
1.18
1.19 + if options.no_color:
1.20 + util.DisableConsoleColors()
1.21 +
1.22 source_abspath = os.path.normpath(os.path.abspath(self.sourcePath))
1.23 build_abspath = os.path.normpath(os.path.abspath(self.buildPath))
1.24 if source_abspath == build_abspath: