view compile @ 280:23b52d2d05a0

Don't try to replace self in a macro expansion since it's unlikely to be the desired behavior. A more explicit means of specifying what variables should be replaced in a quote expression is needed.
author Michael Pavone <pavone@retrodev.com>
date Mon, 21 Jul 2014 19:30:23 -0700
parents a923b5b7da3d
children 60b9941d3713
line wrap: on
line source

#!/bin/sh

cname=`basename $1`.c

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

./tpc $1 -o $cname

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 runtime/object.c -lgc
gcc $@ -o $bin $cname runtime/object.c -lgc -ldl -lSDL2