fixed command line numeric arguments to debugmode, lamerpack and maintainermode
This commit is contained in:
parent
0a776142ac
commit
315223bfab
|
|
@ -1,17 +1,21 @@
|
|||
#
|
||||
# SCons debug mode build tester
|
||||
#
|
||||
# Version 1.0
|
||||
# 04-Aug-2009
|
||||
# Version 1.1
|
||||
# 18-Aug-2009
|
||||
#
|
||||
|
||||
from SCons.Script import ARGUMENTS
|
||||
|
||||
def checkForDebugBuild(conf):
|
||||
"""Check command line arguments if user requested debug mode build."""
|
||||
conf.Message("checking if we are building with extra debug code... ")
|
||||
conf.Message("Checking if we are building with extra debug code... ")
|
||||
buildlamer=ARGUMENTS.get('enable-debug', 0)
|
||||
if buildlamer == 0 or str(buildlamer).lower() == 'no':
|
||||
try:
|
||||
buildlamer2=int(buildlamer)
|
||||
except ValueError:
|
||||
buildlamer2=None
|
||||
if buildlamer2 == 0 or str(buildlamer).lower() == 'no':
|
||||
conf.Result(0)
|
||||
else:
|
||||
conf.env.Append(CPPFLAGS = '-DDEBUG')
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
#
|
||||
# SCons lamerpack building tester
|
||||
#
|
||||
# Version 1.0
|
||||
# 02-Aug-2009
|
||||
# Version 1.1
|
||||
# 18-Aug-2009
|
||||
#
|
||||
|
||||
from SCons.Script import ARGUMENTS
|
||||
|
||||
def checkForLamerpack(conf):
|
||||
"""Check command line arguments if user requested lamerpack build."""
|
||||
conf.Message("checking if we are building lamer pack... ")
|
||||
conf.Message("Checking if we are building lamer pack... ")
|
||||
buildlamer=ARGUMENTS.get('enable-lamerpack', 0)
|
||||
if buildlamer == 0 or str(buildlamer).lower() == 'no':
|
||||
try:
|
||||
buildlamer2=int(buildlamer)
|
||||
except ValueError:
|
||||
buildlamer2=None
|
||||
if buildlamer2 == 0 or str(buildlamer).lower() == 'no':
|
||||
conf.Result(0)
|
||||
else:
|
||||
conf.env.Append(CPPFLAGS = '-DLAMERPACK')
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
#
|
||||
# SCons check for maintainer mode
|
||||
#
|
||||
# Version 1.1
|
||||
# 24-Jul-2009
|
||||
# Version 1.2
|
||||
# 18-Aug-2009
|
||||
#
|
||||
|
||||
from SCons.Script import ARGUMENTS
|
||||
|
||||
def checkForMaintainerMode(conf):
|
||||
"""Check if user wants to enable maintainer compilation mode."""
|
||||
conf.Message("checking whether to enable maintainer mode... ")
|
||||
if ARGUMENTS.get('maintainer-mode', 0) or \
|
||||
ARGUMENTS.get('enable-maintainer-mode', 0):
|
||||
conf.Message("Checking whether to enable maintainer mode... ")
|
||||
maint=ARGUMENTS.get('maintainer-mode', 0) or \
|
||||
ARGUMENTS.get('enable-maintainer-mode', 0)
|
||||
try:
|
||||
maint2=int(maint)
|
||||
except ValueError:
|
||||
maint2=None
|
||||
if maint2 > 0 or str(maint).lower() == 'yes':
|
||||
conf.Result(1)
|
||||
conf.env.Append(CCFLAGS = '-O0')
|
||||
conf.env.Append(CPPFLAGS = '-DMAINTAINER_MODE')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user