File: lockprefix.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-- 475 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 FSP lock prefix tester
#
# Version 1.2
# 15-Aug-2019
#

from SCons.Script import ARGUMENTS

def checkForLockPrefix(conf):
    """Check for user-supplied lock prefix."""
    conf.Message("Checking for user supplied lockprefix... ")
    lp = ARGUMENTS.get('lockprefix', 0) or ARGUMENTS.get("with-lockprefix",0)

    if lp:
          conf.Result(1)
          conf.env.Append(CPPFLAGS = '-DFSP_KEY_PREFIX=\\"'+lp+'\\"')
    else:
          conf.Result(0)