diff options
Diffstat (limited to 'dbug/mklintlib.sh')
-rw-r--r-- | dbug/mklintlib.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dbug/mklintlib.sh b/dbug/mklintlib.sh new file mode 100644 index 00000000000..6963016f334 --- /dev/null +++ b/dbug/mklintlib.sh @@ -0,0 +1,30 @@ + +# Warning - first line left blank for sh/csh/ksh compatibility. Do not +# remove it. fnf@Unisoft + +# mklintlib --- make a lint library, under either System V or 4.2 BSD +# +# usage: mklintlib <infile> <outfile> +# + +if test $# -ne 2 +then + echo "usage: mklintlib <infile> <outfile>" + exit 1 +fi + +if grep SIGTSTP /usr/include/signal.h >/dev/null +then # BSD + if test -r /usr/include/whoami.h # 4.1 + then + /lib/cpp -C -Dlint $1 >hlint + (/usr/lib/lint/lint1 <hlint >$2) 2>&1 | grep -v warning + else # 4.2 + lint -Cxxxx $1 + mv llib-lxxxx.ln $2 + fi +else # USG + cc -E -C -Dlint $1 | /usr/lib/lint1 -vx -Hhlint >$2 + rm -f hlint +fi +exit 0 # don't kill make |