X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=bin%2Ffrtn;h=31195a86fa1ce3f45aca2eb10db739fbe243e930;hb=52147402c19a69c9774bb256420a16233043d3fe;hp=f89f7d150e4bb0a88e59f451425509193f0bbbc6;hpb=4dafd752143adb3a13d2f7203d15abbf202764e4;p=h316.git diff --git a/bin/frtn b/bin/frtn index f89f7d1..31195a8 100755 --- a/bin/frtn +++ b/bin/frtn @@ -1,18 +1,57 @@ #!/bin/sh # FORTRAN IV compiler wrapper for simh h316 +if [ "$FRTN_ORIGINAL" ]; then + LOGNAME="FORTRAN IV COMPILER (Original):" +else + LOGNAME="FORTRAN IV COMPILER:" +fi + if [ ! $1 ] ; then - echo "Argument missing!" + echo "$LOGNAME Input file missing!" exit 2 fi name=`basename $1 .f` +if [ ! -f "$1" ]; then + echo "$LOGNAME Input file \"$name\" not found!" + exit 2 +fi + + listfile=$name.lst cat $1 | tab | paron > $name.par rm -f $name.lst rm -f $name.obj +echo -n "$LOGNAME Compiling \"$1\":" + +if [ "$FRTN_ORIGINAL" ]; then + +cat > $name.go < $name.go < /dev/null if cat $name.lst | egrep "[*]{36,40}">/dev/null 2>&1; then cat $name.lst - echo -e "\n\nFORTRAN IV compilation FAILED!" + echo -e " FAILED!" rm -f $name.obj exit 77 fi @@ -47,7 +88,7 @@ if [ ! $2 ]; then rm -f $name.par fi -echo "FORTRAN IV compilation successfull." +echo " Success." exit 0