summaryrefslogtreecommitdiff
path: root/misc/makellib
diff options
context:
space:
mode:
Diffstat (limited to 'misc/makellib')
-rwxr-xr-xmisc/makellib40
1 files changed, 20 insertions, 20 deletions
diff --git a/misc/makellib b/misc/makellib
index 06e50f2..fb3d3b7 100755
--- a/misc/makellib
+++ b/misc/makellib
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2021 Thomas E. Dickey #
# Copyright 1998,2000 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -30,7 +30,7 @@
#
# Author: Thomas E. Dickey 1996,1997,2000
#
-# $Id: makellib,v 1.9 2020/02/02 23:34:34 tom Exp $
+# $Id: makellib,v 1.11 2021/09/04 15:49:38 tom Exp $
# System-dependent wrapper for 'lint' that creates a lint-library via the
# following method (XXX is the name of the library):
# a. If the file llib-lXXX doesn't exist, create it using the make-rule
@@ -45,7 +45,7 @@
# a. On a few systems, you'll have to manually-edit the llib-lXXX file
# to get a usable lint-library (not all C-preprocessors work well).
# b. The system's lint utility won't recognize -lXXX as a lint-library
-# (Use tdlint as a wrapper; it's designed for this).
+# (Use tdlint as a wrapper; it is designed for this).
#
# Parameters:
# $1 = library name
@@ -68,7 +68,7 @@ while test $# != 0
do
case $1 in
-L*)
- DST="$DST `echo $1|sed -e 's/^-L//'`"
+ DST="$DST `echo "$1"|sed -e 's/^-L//'`"
;;
-*)
OPT="$OPT $1"
@@ -94,8 +94,8 @@ then
llib="llib-l$LLIB"
fi
-if test ! -f $llib ; then
- if ( make $llib )
+if test ! -f "$llib" ; then
+ if ( make "$llib" )
then
:
else
@@ -103,39 +103,39 @@ if test ! -f $llib ; then
fi
fi
-rm -f $llib.ln $llib.c
+rm -f "$llib.ln" "$llib.c"
TARGET=$LLIB
case "$ARCH" in
AIX)
CREATE="-uvxo$LLIB -Nn4000"
TARGET=$llib.c
- ln $llib $TARGET
+ ln "$llib" "$TARGET"
;;
Solaris)
CREATE="-C$llib"
TARGET=$llib.c
- ln $llib $TARGET
+ ln "$llib" "$TARGET"
;;
FreeBSD)
CREATE="-g -z -C$LLIB"
TARGET=$llib.c
- ln $llib $TARGET
+ ln "$llib" "$TARGET"
;;
CLIX)
CREATE="-DLINTLIBRARY -vxo$LLIB"
TARGET=$llib.c
- ln $llib $TARGET
+ ln "$llib" "$TARGET"
;;
IRIX*)
CREATE="-DLINTLIBRARY -vxyo$LLIB"
TARGET=$llib.c
- ln $llib $TARGET
+ ln "$llib" "$TARGET"
;;
UNIX_SV)
CREATE="-DLINTLIBRARY -vxyo$LLIB"
TARGET=$llib.c
- ln $llib $TARGET
+ ln "$llib" "$TARGET"
;;
*)
echo "Sorry. I do not know how to build a lint-library for $ARCH"
@@ -145,24 +145,24 @@ esac
echo OPT "$OPT"
echo TARGET "$TARGET"
echo LIBNAME "$llib"
-if ( lint $CREATE $OPT $TARGET )
+if ( lint "$CREATE" "$OPT" "$TARGET" )
then
- if test -f $llib.ln
+ if test -f "$llib.ln"
then
for p in $HOME/lib $HOME/lib/$ARCH $HOME/lib/$ARCH/lint
do
- if test ! -d $p
+ if test ! -d "$p"
then
- mkdir $p
+ mkdir "$p"
fi
done
for p in $DST
do
- cp $llib.ln $p/
+ cp "$llib.ln" "$p/"
done
- rm -f $llib.ln
+ rm -f "$llib.ln"
fi
fi
if test "x$TARGET" = "x$llib.c" ; then
- rm -f $TARGET
+ rm -f "$TARGET"
fi