2 ################################################################################
3 # Copyright 1996,1997 by Thomas E. Dickey <dickey@clark.net> #
4 # All Rights Reserved. #
6 # Permission to use, copy, modify, and distribute this software and its #
7 # documentation for any purpose and without fee is hereby granted, provided #
8 # that the above copyright notice appear in all copies and that both that #
9 # copyright notice and this permission notice appear in supporting #
10 # documentation, and that the name of the above listed copyright holder(s) not #
11 # be used in advertising or publicity pertaining to distribution of the #
12 # software without specific, written prior permission. THE ABOVE LISTED #
13 # COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, #
14 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT #
15 # SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL, #
16 # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM #
17 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE #
18 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR #
19 # PERFORMANCE OF THIS SOFTWARE. #
20 ################################################################################
21 # $Id: makellib,v 1.6 1997/03/02 01:28:36 tom Exp $
22 # System-dependent wrapper for 'lint' that creates a lint-library via the
23 # following method (XXX is the name of the library):
24 # a. If the file llib-lXXX doesn't exist, create it using the make-rule
25 # b. Process llib-lXXX with the system's lint utility, making
27 # c. Install llib-lXXX.ln in the lib directory.
29 # Using the intermediate file llib-lXXX bypasses a weakness of lint (passing
30 # through warning messages from the original source-files).
32 # There are two drawbacks to this approach:
33 # a. On a few systems, you'll have to manually-edit the llib-lXXX file
34 # to get a usable lint-library (not all C-preprocessors work well).
35 # b. The system's lint utility won't recognize -lXXX as a lint-library
36 # (Use tdlint as a wrapper; it's designed for this).
40 # $* = C-preprocessor options
43 if test "x$ARCH" = "xSunOS" ; then
50 DST="$HOME/lib/$ARCH/lint"
59 DST="$DST `echo $1|sed -e 's/^-L//'`"
78 echo '? no library name specified'
85 if test ! -f $llib ; then
94 rm -f $llib.ln $llib.c
99 CREATE="-uvxo$LLIB -Nn4000"
109 CREATE="-DLINTLIBRARY -vxo$LLIB"
114 CREATE="-DLINTLIBRARY -vxyo$LLIB"
119 CREATE="-DLINTLIBRARY -vxyo$LLIB"
124 echo "Sorry. I do not know how to build a lint-library for $ARCH"
129 echo TARGET "$TARGET"
131 if ( lint $CREATE $OPT $TARGET )
135 for p in $HOME/lib $HOME/lib/$ARCH $HOME/lib/$ARCH/lint
149 if test "x$TARGET" = "x$llib.c" ; then