fsp/site_scons/prefix.py
2009-07-24 22:28:40 +02:00

20 lines
435 B
Python

#
# SCons user-supplied prefix tester
#
# Version 1.0
# 16-Jun-2009
#
from SCons.Script import ARGUMENTS
def checkForUserPrefix(conf,oldprefix=None):
"""Returns prefix specified on command line or oldprefix if none is found."""
conf.Message("checking for user supplied prefix... ")
lp = ARGUMENTS.get('prefix', 0)
if lp:
conf.Result(1)
return lp
else:
conf.Result(0)
return oldprefix