diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-21 11:24:40 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-21 11:24:40 -0400 |
commit | 6d07d0a4ac74f11bcfcda64ff4ffb8c75bc00960 (patch) | |
tree | 8b4e6a8bf554b91c03a2985e7fae991fb27f4adc | |
parent | bbf90069b3aed188ee1d2a7e5fb83ce93bce51be (diff) | |
download | roux-6d07d0a4ac74f11bcfcda64ff4ffb8c75bc00960.tar.gz |
make mcc runable from anywhere
-rwxr-xr-x | minic/mcc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/minic/mcc b/minic/mcc index 1c54fb9..c8d500e 100755 --- a/minic/mcc +++ b/minic/mcc @@ -1,5 +1,8 @@ #!/bin/sh +DIR=`cd $(dirname $0); pwd` +QBE=$DIR/../obj/qbe + usage() { echo "usage: mcc [LDFLAGS] file.c" >&2 @@ -28,8 +31,8 @@ then fi -../minic/minic < $file > /tmp/minic.ssa && -../obj/qbe < /tmp/minic.ssa > /tmp/minic.s && +$DIR/minic < $file > /tmp/minic.ssa && +$QBE < /tmp/minic.ssa > /tmp/minic.s && cc $flags /tmp/minic.s if test $? -ne 0 |