summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-27 19:13:34 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-27 19:13:34 -0400
commit205221226f750700f4a0adc077c94d1185f8dd89 (patch)
tree68189b96fca78838ce707468a2655d27f46734f4
parent3406a5fb2f64dc94a5fff4cb61b4c9a48a551b49 (diff)
downloadroux-205221226f750700f4a0adc077c94d1185f8dd89.tar.gz
move check rule into src/
-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 + $?`