-
Notifications
You must be signed in to change notification settings - Fork 7
/
:mkucblib
38 lines (36 loc) · 839 Bytes
/
:mkucblib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ident "@(#)mk::mkucblib 1.1.2.1"
#
# Build Compatibility Package libraries
# For each directory build the library by invoking its
# makefile (<dir>.mk).
#
trap "exit 1" 1 2 3 15
MAKE=${MAKE:-make}
SRCDIR=${SRC:-$ROOT/usr/src}/ucblib
CLOBBER=${CLOBBER:-"ON"}
if [ ! -d $ROOT/usr/ucblib ] ; then mkdir $ROOT/usr/ucblib ; fi
cd $SRCDIR
#
for ARG in $*
do
LIB=`basename $ARG`
if [ -d $LIB ]
then (
echo "======== $LIB"
cd $LIB
if [ -f $LIB.mk ]
then
$MAKE -b -f $LIB.mk ROOT=$ROOT install I="install -i -n $ROOT/lib $ROOT/usr/lib"
if [ $? -ne 0 ]
then
echo ":mklib: *** $MAKE failed using $LIB.mk"
fi
test "$CLOBBER" != "OFF" && $MAKE -b -f $LIB.mk clobber
else
echo ":mklib: *** no $LIB.mk file in $SRCDIR/$LIB"
fi
) else
echo ":mklib: *** no directory found for $LIB under $SRCDIR"
fi
done
exit 0