maintainer mode check can be overrided (forced on) by parameter
This commit is contained in:
parent
7da1c7fcf6
commit
0b50d9bb3e
|
|
@ -1,14 +1,16 @@
|
||||||
#
|
#
|
||||||
# SCons check for maintainer mode
|
# SCons check for maintainer mode
|
||||||
#
|
#
|
||||||
# Version 1.2
|
# Version 1.3
|
||||||
# 18-Aug-2009
|
# 13-Sep-2009
|
||||||
#
|
#
|
||||||
|
|
||||||
from SCons.Script import ARGUMENTS
|
from SCons.Script import ARGUMENTS
|
||||||
|
|
||||||
def checkForMaintainerMode(conf):
|
def checkForMaintainerMode(conf,force=False):
|
||||||
"""Check if user wants to enable maintainer compilation mode."""
|
"""Check if user wants to enable maintainer compilation mode.
|
||||||
|
|
||||||
|
If force is true than maintainer mode is forced"""
|
||||||
conf.Message("Checking whether to enable maintainer mode... ")
|
conf.Message("Checking whether to enable maintainer mode... ")
|
||||||
maint=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)
|
||||||
|
|
@ -16,6 +18,7 @@ def checkForMaintainerMode(conf):
|
||||||
maint2=int(maint)
|
maint2=int(maint)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
maint2=None
|
maint2=None
|
||||||
|
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')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user