SCons now supports lamerpack build

This commit is contained in:
Radim Kolar 2009-08-02 22:18:56 +02:00
parent 9e1cb9abdd
commit fc64d4b887
2 changed files with 22 additions and 1 deletions

View File

@ -49,13 +49,15 @@ from prefix import checkForUserPrefix
from lockprefix import checkForLockPrefix
from clangtest import getVariableSize
from locktype import checkForLockingType
from lamerpack import checkForLamerpack
conf = Configure(env,{'checkForCCOption':checkForCCOption,
'MAINTAINER_MODE':checkForMaintainerMode,
'checkForLockPrefix':checkForLockPrefix,
'checkPrefix':checkForUserPrefix,
'sizeOf':getVariableSize,
'checkForLockingType':checkForLockingType
'checkForLockingType':checkForLockingType,
'checkForLamerPack':checkForLamerpack
})
# check for CC options
for option in Split("""
@ -103,6 +105,7 @@ conf.env.Append(CPPFLAGS = '-DSYSCONFDIR=\\"'+PREFIX+'/etc\\"')
EFENCE = conf.MAINTAINER_MODE()
if EFENCE == True:
EFENCE=conf.CheckLib("efence","EF_Abort")
conf.checkForLamerPack()
conf.Finish()
env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"")

18
site_scons/lamerpack.py Normal file
View File

@ -0,0 +1,18 @@
#
# SCons lamerpack building tester
#
# Version 1.0
# 02-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... ")
buildlamer=ARGUMENTS.get('enable-lamerpack', 0)
if buildlamer == 0 or str(buildlamer).lower() == 'no':
conf.Result(0)
else:
conf.env.Append(CPPFLAGS = '-DLAMERPACK')
conf.Result(1)