summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--minic/Makefile3
-rw-r--r--src/Makefile4
-rwxr-xr-xtest/go.sh7
4 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 5d8ed82..9aefa3e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,7 @@
-all clean:
+all clean check:
 	@make -C src $@
 	@make -C minic $@
-check: all
-	test/go.sh all
+
 sync-papers:
 	unison -auto papers ssh://qcar@h/data/d/ssa-doc
 
diff --git a/minic/Makefile b/minic/Makefile
index 1999cf0..66f0f04 100644
--- a/minic/Makefile
+++ b/minic/Makefile
@@ -7,7 +7,8 @@ $(BIN): yacc minic.y
 	$(CC) $(CFLAGS) -o $@ y.tab.c
 
 all: $(BIN)
+check:
 clean:
 	rm -f yacc minic y.*
 
-.PHONY: all clean
+.PHONY: all check clean
diff --git a/src/Makefile b/src/Makefile
index 9b6b7a5..6adfbd3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -18,7 +18,7 @@ config.h:
 all: $(BIN)
 clean:
 	rm -f $(BIN) $(OBJ)
-check:
-	make -C .. check
+check: $(BIN)
+	../test/go.sh all
 
 .PHONY: all clean check syndoc
diff --git a/test/go.sh b/test/go.sh
index 7bc795f..3f57aaa 100755
--- a/test/go.sh
+++ b/test/go.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-QBE=`readlink -f $0 | xargs dirname`/../src/qbe
+DIR=`readlink -f $0 | xargs dirname`
+QBE=$DIR/../src/qbe
 
 TMP=/tmp/qbe.zzzz
 
@@ -41,7 +42,7 @@ once() {
 		exit 1
 	fi
 
-	echo "$T... "
+	echo "$(basename $T)..."
 
 	if ! $QBE -o $ASM $T
 	then
@@ -97,7 +98,7 @@ fi
 case $1 in
 	"all")
 		F=0
-		for T in test/[!_]*.ssa
+		for T in $DIR/[!_]*.ssa
 		do
 			once $T
 			F=`expr $F + $?`