annotate compile @ 238:3bfc00e4f5e5

Eval lambda assignments at macro expandion time so they can be called by macros
author Mike Pavone <pavone@retrodev.com>
date Sun, 05 Jan 2014 19:27:41 -0800
parents 5071d601fe70
children cba0cb39517a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #!/bin/sh
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 cname=`basename $1`.c
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 if test -f "$cname"; then
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 rm "$cname"
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 fi
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8
79
7f635666c73d Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents: 36
diff changeset
9 ./tpc $1 -o $cname
36
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 if test ! -s "$cname"; then
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 echo "Compilation to C failed"
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 exit 1
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 fi
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15
148
5071d601fe70 Fix small bug in compile script
Mike Pavone <pavone@retrodev.com>
parents: 79
diff changeset
16 bin=`echo $1 | sed 's/\.tp//'`
36
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17 shift
148
5071d601fe70 Fix small bug in compile script
Mike Pavone <pavone@retrodev.com>
parents: 79
diff changeset
18 echo gcc $@ -o $bin $cname runtime/object.c -lgc
79
7f635666c73d Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents: 36
diff changeset
19 gcc $@ -o $bin $cname runtime/object.c -lgc