view compile @ 331:61f5b794d939

Breaking change: method call syntax now always uses the syntactic receiver as the actual receiver. This makes its behavior different from function call syntax, but solves some problems with methods being shadowed by local variables and the like.
author Michael Pavone <pavone@retrodev.com>
date Sat, 28 Mar 2015 14:21:04 -0700
parents 6dfbf5691a7f
children
line wrap: on
line source

#!/bin/sh

cname=`basename $1`.c

if test -f "$cname"; then
	rm "$cname"
fi

dir=`dirname $0`
$dir/tpc $1 -o $cname -basedir $dir/

if test ! -s "$cname"; then
	echo "Compilation to C failed"
	exit 1
fi

bin=`echo $1 | sed 's/\.tp//'`
shift
echo gcc $@ -o $bin $cname $dir/runtime/object.c -lgc
gcc -o $bin $cname $dir/runtime/object.c -I$dir $@ -lgc