if 'msys_nt' in host:
host = 'msys_nt'
-if not host_target_map.has_key(host):
- print "\nError: Current system (%s) isn't supported\n" % host
+if host not in host_target_map:
+ print(("\nError: Current system (%s) isn't supported\n" % host))
Exit(1)
######################################################################
target_os = ARGUMENTS.get('TARGET_OS', host).lower() # target os
if target_os not in host_target_map[host]:
- print "\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host])
+ print(("\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host])))
Exit(1)
if target_os == 'android':
# targets that do not support the DTLS build (SECURED=1 build option)
targets_without_dtls_support = ['arduino'];
if ARGUMENTS.get('SECURED') == '1' and target_os in targets_without_dtls_support:
- print "\nError: DTLS not supported on target os: %s MUST build with SECURED=0\n" % (target_os)
+ print(("\nError: DTLS not supported on target os: %s MUST build with SECURED=0\n" % (target_os)))
Exit(1)
######################################################################
env.AppendUnique(CCFLAGS = ['--sysroot=' + sys_root])
env.AppendUnique(LINKFLAGS = ['--sysroot=' + sys_root])
- if target_os == 'tizenrt':
+ if target_os == 'tizenrt':
env.PrependENVPath('PATH', os.environ['PATH'])
if prefix or tc_path:
- print tc_set_msg
+ print(tc_set_msg)
# If cross-compiling, honor environment settings for toolchain to avoid picking up native tools
if os.environ.get('PKG_CONFIG') != None:
def __set_dir(env, dir):
if not os.path.exists(dir + '/SConstruct'):
- print '''
+ print(('''
*************************************** Error *********************************
* The directory(%s) seems isn't a source code directory, no SConstruct file is
* found. *
*******************************************************************************
-''' % dir
+''' % dir))
Exit(1)
if env.get('RELEASE'):
if os.environ['LDFLAGS'] != None:
env.AppendUnique(LINKFLAGS = Split(os.environ['LDFLAGS']))
except:
- print "ERROR in Yocto cross-toolchain environment"
+ print("ERROR in Yocto cross-toolchain environment")
Exit(1)
'''
Now reset TARGET_OS to linux so that all linux specific build configurations