#!/bin/csh
#
echo "Split the file."
#
mkdir temp
cd temp
rm *
fsplit ../timestamp.f
#
echo " "
echo "Compile the routines."
#
foreach FILE (`ls -1 *.f`)
  g77 -c -g $FILE >& compiler.out
  if ( $status != 0 ) then
    echo "Errors compiling " $FILE
    exit
  endif
  rm compiler.out
end
rm *.f
#
echo "Create the archive."
ar qc libtimestamp.a *.o
rm *.o
#
echo "Store the archive."
mv libtimestamp.a ~/libf77/$ARCH
cd ..
rmdir temp
#
echo "A new version of timestamp has been created."
