From 6d07d0a4ac74f11bcfcda64ff4ffb8c75bc00960 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Thu, 21 Apr 2016 11:24:40 -0400 Subject: make mcc runable from anywhere --- minic/mcc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'minic') 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 -- cgit 1.4.1