Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!ucbvax!decwrl!hplabs!motsj1!mcdchg!mcdphx!estinc!fnf From: fnf@estinc.UUCP (Fred Fish) Newsgroups: comp.unix.xenix Subject: Re: Create Lint Libraries? Keywords: lint Message-ID: <88@estinc.UUCP> Date: 21 May 89 00:55:07 GMT References: <202@melpar.UUCP> Reply-To: fnf@estinc.UUCP (Fred Fish) Distribution: usa Organization: Enhanced Software Technologies, Inc. Lines: 46 In article <202@melpar.UUCP> toppin@melpar.UUCP (Doug Toppin) writes: >I have been trying to create a lint library with >an SCO Xenix 386 system and have not been able to >do it properly. I have not been able to find an example >on how to use the '-o' option with lint. Here is the shell script I use to make lint libraries on a variety of different systems. I just tested it under SCO 2.3.1 and it seemed to work just fine. If the name of your library is mylib.c, just make a lint source file in mylib.lint by stripping out the bodies of all the functions and adding "/*LINTLIBRARY*/" at the beginning of mylib.lint. Then do "mklintlib mylib.lint llibmylib.ln", install the file as /usr/lib/llibmylib.ln, and to use with a program myprog.c that references the library, run "lint myprog.c -lmylib". -Fred # mklintlib --- make a lint library, under either System V or 4.2 BSD # # usage: mklintlib # if test $# -ne 2 then echo "usage: mklintlib " 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 $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 -- # Fred Fish, 1835 E. Belmont Drive, Tempe, AZ 85284, USA # 1-602-491-0048 asuvax!{nud,mcdphx}!estinc!fnf