merge site_scons scripts from fsplib to be Python3 compatible

This commit is contained in:
Radim Kolar 2019-08-16 08:37:25 +02:00
parent cb795e9256
commit 365c55c865
2 changed files with 11 additions and 11 deletions

View File

@ -1,8 +1,8 @@
#
# SCons user-supplied FSP lock prefix tester
#
# Version 1.1
# 24-Aug-2009
# Version 1.2
# 15-Aug-2019
#
from SCons.Script import ARGUMENTS
@ -13,7 +13,7 @@ def checkForLockPrefix(conf):
lp = ARGUMENTS.get('lockprefix', 0) or ARGUMENTS.get("with-lockprefix",0)
if lp:
conf.Result(1)
conf.env.Append(CPPFLAGS = '-DFSP_KEY_PREFIX=\\"'+lp+'\\"')
conf.Result(1)
conf.env.Append(CPPFLAGS = '-DFSP_KEY_PREFIX=\\"'+lp+'\\"')
else:
conf.Result(0)
conf.Result(0)

View File

@ -1,8 +1,8 @@
#
# SCons check for maintainer mode
#
# Version 1.3
# 13-Sep-2009
# Version 1.4
# 15-Aug-2019
#
from SCons.Script import ARGUMENTS
@ -20,10 +20,10 @@ def checkForMaintainerMode(conf,force=False):
maint2=None
if force: maint2 = 1
if maint2 > 0 or str(maint).lower() == 'yes':
conf.Result(1)
conf.env.Append(CCFLAGS = '-O0')
conf.env.Append(CPPFLAGS = '-DMAINTAINER_MODE')
conf.Result(1)
conf.env.Append(CCFLAGS = '-O0')
conf.env.Append(CPPFLAGS = '-DMAINTAINER_MODE')
return True
else:
conf.Result(0)
conf.Result(0)
return False