[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with prerequisites for unit testing rule
From: |
Björn Lindström |
Subject: |
Help with prerequisites for unit testing rule |
Date: |
Tue, 08 Feb 2005 15:28:41 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
I have this Makefile:
----
CLASSPATH=.:/usr/share/java/junit.jar
JAVAC=javac -classpath $(CLASSPATH)
JUNIT=java -classpath $(CLASSPATH) junit.textui.TestRunner
CLASSES=A.class B.class C.class
all: $(CLASSES)
%.class: %.java
$(JAVAC) $<
test: $(CLASSES:%=Test%)
$(JUNIT) $(patsubst %.class,%,$<)
.PHONY: clean
clean:
-rm $(CLASSES) $(CLASSES:%=Test%)
----
My question is how to get the test rule to make A.class a prerequisite
for TestA.class, B.class a prerequisite for TestB.class, and so on.
Any ideas?