annotate compile @ 148:5071d601fe70

Fix small bug in compile script
author Mike Pavone <pavone@retrodev.com>
date Fri, 09 Aug 2013 05:28:07 -0700
parents 7f635666c73d
children cba0cb39517a
rev   line source
pavone@36 1 #!/bin/sh
pavone@36 2
pavone@36 3 cname=`basename $1`.c
pavone@36 4
pavone@36 5 if test -f "$cname"; then
pavone@36 6 rm "$cname"
pavone@36 7 fi
pavone@36 8
pavone@79 9 ./tpc $1 -o $cname
pavone@36 10
pavone@36 11 if test ! -s "$cname"; then
pavone@36 12 echo "Compilation to C failed"
pavone@36 13 exit 1
pavone@36 14 fi
pavone@36 15
pavone@148 16 bin=`echo $1 | sed 's/\.tp//'`
pavone@36 17 shift
pavone@148 18 echo gcc $@ -o $bin $cname runtime/object.c -lgc
pavone@79 19 gcc $@ -o $bin $cname runtime/object.c -lgc