annotate compilenotify @ 188:170ad9cb6384

Remove obsolete interpreter related stuff
author Mike Pavone <pavone@retrodev.com>
date Fri, 07 Oct 2011 00:22:31 -0700
parents 5e752cf2d6b1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
187
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #!/bin/sh
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 if test -f "$1.c"; then
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 rm "$1.c"
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 fi
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 ./rhope2c $1 | tee rhope2c_output.txt
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 error_txt=`grep -C 2 [Ee]rror rhope2c_output.txt`
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 if test ! -s "$1.c"; then
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 notify-send -i error 'Compilation to C failed' "Compilation of $1 to C failed. Deatils:\n$error_txt"
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 echo "Compilation to C failed"
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 exit 1
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 fi
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 notify-send -i info 'Compilation to C complete', "Compilation of $1 to C is complete. Compilation to native code has begun"
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17 ./ctobinnotify $@
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18 #cp runtime/* build/
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19 #cp "$1.c" build/
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
20 #cd build
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
21 #bin=`echo $1 | sed s/\.rhope//`
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
22 #
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
23 #if test -f "$bin"; then
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
24 # rm "$bin"
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
25 #fi
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
26 #gcc -Wformat=0 -o $bin $2 "$1.c" blueprint.c context.c fixed_alloc.c object.c
5e752cf2d6b1 Add versions of compile and ctobin scripts that have desktop notifications
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
27