1984-07-19 11:50:18 +00:00
|
|
|
: '$Header$'
|
|
|
|
|
|
|
|
case $# in
|
|
|
|
3) makecmd=$3 ;;
|
1984-07-19 13:22:36 +00:00
|
|
|
2) makecmd=compmodule ;;
|
1984-07-19 11:50:18 +00:00
|
|
|
*) echo "Usage: $0 srcdir archname [ makecmd ]"; exit 1 ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
errors=no
|
|
|
|
if test -r $1/LIST
|
|
|
|
then
|
|
|
|
<$1/LIST (
|
|
|
|
read archname
|
|
|
|
if test -r $1/$archname
|
|
|
|
then
|
|
|
|
arch x $1/$archname
|
|
|
|
for file in `arch t $1/$archname`
|
|
|
|
do
|
|
|
|
suffix=`expr $file : '.*\(\..*\)'`
|
|
|
|
ofile=`$makecmd $file $suffix`
|
|
|
|
if test $? != 0
|
|
|
|
then errors=yes
|
|
|
|
fi
|
|
|
|
rm $file
|
|
|
|
OFILES="$OFILES $ofile"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
while read file
|
|
|
|
do
|
|
|
|
suffix=`expr $file : '.*\(\..*\)'`
|
|
|
|
ofile=`$makecmd $1/$file $suffix`
|
|
|
|
if test $? != 0
|
|
|
|
then errors=yes
|
|
|
|
fi
|
|
|
|
OFILES="$OFILES $ofile"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
if test $errors = no
|
|
|
|
then
|
1984-07-19 14:55:12 +00:00
|
|
|
${ASAR-arch} cr $2 $OFILES
|
1984-07-19 11:50:18 +00:00
|
|
|
rm $OFILES
|
|
|
|
else
|
|
|
|
echo $2 not made, due to compilation errors
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
)
|
|
|
|
else
|
|
|
|
echo no LIST file in directory $1
|
|
|
|
exit 1
|
|
|
|
fi
|