echo "This shell file builds the RMCOBOL compiler (rmcobol) along with"
echo "the intermediate modules needed to create the compiler system."
echo " "
make -f makecmp "CFLAGS= -O"
if test $? != "0"
  then  echo "Failed to create rmcoboli.a"
	if test -f rmcoboli.a
	  then rm rmcoboli.a
	fi
	exit 1
fi
echo " "
echo "sh linkcmp"
sh linkcmp
if test $? != "0"
  then  echo "Failed to create rmcobol"
	exit 1
fi
echo " "
echo "rmcobol has been successfully generated"
echo "Now preparing the compiler directory for distribution . . ."
echo " "
ln rmcconfig.c ../compiler
ln rmcconfig.o ../compiler
ln linkcmp ../compiler
ln rmcobol ../compiler
if test -f rmcoboli.a
  then ln rmcoboli.a ../compiler
  else ln rmcoboli.o ../compiler
fi
ls -l ../compiler
echo " "
echo "You are now ready to build the runtime."
