1989-12-19 10:59:33 +00:00
|
|
|
# $Header$
|
|
|
|
# This script makes an archive. The only option it knows is -o, which
|
|
|
|
# creates a library.
|
|
|
|
|
|
|
|
rm -f OLIST
|
|
|
|
|
|
|
|
case $# in
|
|
|
|
0)
|
|
|
|
AR=tar
|
|
|
|
OLIB=libsrc
|
|
|
|
echo 'cf libsrc' > OLIST
|
|
|
|
;;
|
|
|
|
1)
|
|
|
|
if [ "X$1" != "X-o" ]
|
|
|
|
then
|
|
|
|
echo $0: unrecognised option, I only know -o >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
AR=$ASAR
|
1989-12-19 15:06:03 +00:00
|
|
|
echo "rv $OLIB" > OLIST
|
1989-12-19 10:59:33 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo $0: too many arguments >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "X$AR" = "X" ]
|
|
|
|
then
|
|
|
|
echo EEK -- internal error, no archiver >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $AR = tar ]
|
|
|
|
then
|
|
|
|
echo LIST >> OLIST
|
|
|
|
echo MakeArch >> OLIST
|
|
|
|
echo Makefile >> OLIST
|
1989-12-19 15:06:03 +00:00
|
|
|
echo make.proto >> OLIST
|
1990-09-27 15:49:13 +00:00
|
|
|
echo head_ac.e >> OLIST
|
1989-12-19 10:59:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
DIRS=`cat LIST`
|
|
|
|
|
|
|
|
for i in $DIRS
|
|
|
|
do
|
|
|
|
cd $i
|
|
|
|
if make "MACH=$MACH" "MACHFL=$MACHFL" $AR -f ../Makefile
|
|
|
|
then
|
|
|
|
cd ..
|
|
|
|
if [ $AR = tar ]
|
|
|
|
then
|
|
|
|
echo $i/Makefile >> OLIST
|
|
|
|
echo $i/LIST >> OLIST
|
|
|
|
fi
|
|
|
|
for j in `cat $i/OLIST`
|
|
|
|
do
|
|
|
|
echo $i/$j >> OLIST
|
|
|
|
done
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
$AR `cat OLIST`
|
|
|
|
${RANLIB-:} $OLIB
|