# # 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