File: prefix.py

package info (click to toggle)
fsplib 0.14-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 236 kB
  • sloc: ansic: 1,581; python: 117; makefile: 11; sh: 8
file content (19 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# SCons user-supplied prefix tester
#
# Version 1.1
# 24-Aug-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