view compile @ 51:90542a7077a9

adding compiler bug test case.
author William Morgan <bill@mrgn.org>
date Fri, 13 Jul 2012 17:57:00 -0700
parents 3b0503a67165
children 7f635666c73d
line wrap: on
line source

#!/bin/sh

cname=`basename $1`.c

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

d8 tpc.js -- $1 > $cname

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

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