backport to buster
[hcoop/debian/openafs.git] / src / helper-splint.sh.in
CommitLineData
805e021f
CE
1#! /bin/sh
2
3# Invoke "splint" with common options.
4#
5# This uses a common splint.cfg file. It will also look for a
6# splint.cfg file in the current directory, using that instead, or a
7# splint-append.cfg file, using that in addition to the common
8# configuration.
9
10
11TOP_SRCDIR=@TOP_SRCDIR@
12HELPER_SPLINTCFG=@HELPER_SPLINTCFG@
13
14cfargs="-f ${HELPER_SPLINTCFG}"
15#
16if [ -r splint-append.cfg ]; then
17 echo "Appending contents of splint-append.cfg to common splint options."
18 cfargs="$cfargs -f splint-append.cfg"
19elif [ -r splint.cfg ]; then
20 echo "Overriding common splint options with splint.cfg"
21 cfargs="-f splint.cfg"
22else
23 echo "No splint-append.cfg or splint.cfg, so using only common options."
24fi
25#
26# Now run splint.
27exec splint $cfargs -bad-flag "$@"