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

View File

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