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
|
# SCons debug mode build tester
|
||||||
#
|
#
|
||||||
# Version 1.0
|
# Version 1.1
|
||||||
# 04-Aug-2009
|
# 18-Aug-2009
|
||||||
#
|
#
|
||||||
|
|
||||||
from SCons.Script import ARGUMENTS
|
from SCons.Script import ARGUMENTS
|
||||||
|
|
||||||
def checkForDebugBuild(conf):
|
def checkForDebugBuild(conf):
|
||||||
"""Check command line arguments if user requested debug mode build."""
|
"""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)
|
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)
|
conf.Result(0)
|
||||||
else:
|
else:
|
||||||
conf.env.Append(CPPFLAGS = '-DDEBUG')
|
conf.env.Append(CPPFLAGS = '-DDEBUG')
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,21 @@
|
||||||
#
|
#
|
||||||
# SCons lamerpack building tester
|
# SCons lamerpack building tester
|
||||||
#
|
#
|
||||||
# Version 1.0
|
# Version 1.1
|
||||||
# 02-Aug-2009
|
# 18-Aug-2009
|
||||||
#
|
#
|
||||||
|
|
||||||
from SCons.Script import ARGUMENTS
|
from SCons.Script import ARGUMENTS
|
||||||
|
|
||||||
def checkForLamerpack(conf):
|
def checkForLamerpack(conf):
|
||||||
"""Check command line arguments if user requested lamerpack build."""
|
"""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)
|
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)
|
conf.Result(0)
|
||||||
else:
|
else:
|
||||||
conf.env.Append(CPPFLAGS = '-DLAMERPACK')
|
conf.env.Append(CPPFLAGS = '-DLAMERPACK')
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,22 @@
|
||||||
#
|
#
|
||||||
# SCons check for maintainer mode
|
# SCons check for maintainer mode
|
||||||
#
|
#
|
||||||
# Version 1.1
|
# Version 1.2
|
||||||
# 24-Jul-2009
|
# 18-Aug-2009
|
||||||
#
|
#
|
||||||
|
|
||||||
from SCons.Script import ARGUMENTS
|
from SCons.Script import ARGUMENTS
|
||||||
|
|
||||||
def checkForMaintainerMode(conf):
|
def checkForMaintainerMode(conf):
|
||||||
"""Check if user wants to enable maintainer compilation mode."""
|
"""Check if user wants to enable maintainer compilation mode."""
|
||||||
conf.Message("checking whether to enable maintainer mode... ")
|
conf.Message("Checking whether to enable maintainer mode... ")
|
||||||
if ARGUMENTS.get('maintainer-mode', 0) or \
|
maint=ARGUMENTS.get('maintainer-mode', 0) or \
|
||||||
ARGUMENTS.get('enable-maintainer-mode', 0):
|
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.Result(1)
|
||||||
conf.env.Append(CCFLAGS = '-O0')
|
conf.env.Append(CCFLAGS = '-O0')
|
||||||
conf.env.Append(CPPFLAGS = '-DMAINTAINER_MODE')
|
conf.env.Append(CPPFLAGS = '-DMAINTAINER_MODE')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user