check for fsp lock prefix externalized
This commit is contained in:
parent
087c072e50
commit
3308bee429
12
SConstruct
12
SConstruct
|
|
@ -38,17 +38,6 @@ env.Replace(CCFLAGS = str(env['CCFLAGS']).split(' '))
|
||||||
|
|
||||||
#################### Tests ###################
|
#################### Tests ###################
|
||||||
|
|
||||||
# check for user-supplied lock prefix
|
|
||||||
def checkForLockPrefix(conf):
|
|
||||||
conf.Message("checking for user supplied lockprefix... ")
|
|
||||||
lp = ARGUMENTS.get('lockprefix', 0) or ARGUMENTS.get("with-lockprefix",0)
|
|
||||||
|
|
||||||
if lp:
|
|
||||||
conf.Result(1)
|
|
||||||
conf.env.Append(CPPFLAGS = '-DFSP_KEY_PREFIX=\\"'+lp+'\\"')
|
|
||||||
else:
|
|
||||||
conf.Result(0)
|
|
||||||
|
|
||||||
def getVarSize(conf,var):
|
def getVarSize(conf,var):
|
||||||
conf.Message("checking for size of "+var+" ")
|
conf.Message("checking for size of "+var+" ")
|
||||||
rc = conf.TryCompile("""
|
rc = conf.TryCompile("""
|
||||||
|
|
@ -85,6 +74,7 @@ main ()
|
||||||
from maintainer import checkForMaintainerMode
|
from maintainer import checkForMaintainerMode
|
||||||
from compilertest import checkForCCOption
|
from compilertest import checkForCCOption
|
||||||
from prefix import checkForUserPrefix
|
from prefix import checkForUserPrefix
|
||||||
|
from lockprefix import checkForLockPrefix
|
||||||
|
|
||||||
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||||
'MAINTAINER_MODE':checkForMaintainerMode,
|
'MAINTAINER_MODE':checkForMaintainerMode,
|
||||||
|
|
|
||||||
19
site_scons/lockprefix.py
Normal file
19
site_scons/lockprefix.py
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#
|
||||||
|
# SCons user-supplied FSP lock prefix tester
|
||||||
|
#
|
||||||
|
# Version 1.0
|
||||||
|
# 20-Jul-2009
|
||||||
|
#
|
||||||
|
|
||||||
|
from SCons.Script import ARGUMENTS
|
||||||
|
|
||||||
|
def checkForLockPrefix(conf):
|
||||||
|
"""Check for user-supplied lock prefix."""
|
||||||
|
conf.Message("checking for user supplied lockprefix... ")
|
||||||
|
lp = ARGUMENTS.get('lockprefix', 0) or ARGUMENTS.get("with-lockprefix",0)
|
||||||
|
|
||||||
|
if lp:
|
||||||
|
conf.Result(1)
|
||||||
|
conf.env.Append(CPPFLAGS = '-DFSP_KEY_PREFIX=\\"'+lp+'\\"')
|
||||||
|
else:
|
||||||
|
conf.Result(0)
|
||||||
Loading…
Reference in New Issue
Block a user