Enable compiler coloring in build terminal
authorErich Keane <erich.keane@intel.com>
Wed, 20 May 2015 17:27:32 +0000 (10:27 -0700)
committerErich Keane <erich.keane@intel.com>
Thu, 21 May 2015 00:02:37 +0000 (00:02 +0000)
This patch forces Scons to inherit all environment terminal
settings, including the support for color.  This allows
warnings/errors to show up in color during the build.

Change-Id: Ibd27cdecef71205d03b0a04043aac0e9763a14d0
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1053
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
SConstruct

index f02a54c..bbe03d1 100644 (file)
 # The main build script
 #
 ##
+import os
 
 # Load common build config
 SConscript('build_common/SConscript')
 
+Import('env')
+
+if os.environ.get('TERM') != None:
+       env['ENV']['TERM'] = os.environ['TERM']
+
 # Load extra options
 SConscript('extra_options.scons')
-Import('env')
 
 target_os = env.get('TARGET_OS')
 if target_os == 'arduino':