[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with prerequisites for unit testing rule
From: |
Paul D. Smith |
Subject: |
Re: Help with prerequisites for unit testing rule |
Date: |
Tue, 8 Feb 2005 10:37:46 -0500 |
%% address@hidden (Björn Lindström) writes:
bl> I have this Makefile:
bl> all: $(CLASSES)
bl> %.class: %.java
bl> $(JAVAC) $<
bl> My question is how to get the test rule to make A.class a prerequisite
bl> for TestA.class, B.class a prerequisite for TestB.class, and so on.
Pattern matches are attempted in the order in which you define the
patterns in your makefile. So, just put more selective patterns first
like this:
Test%.class: Test%.java %.class
$(JAVAC) $<
%.class: %.java
$(JAVAC) $<
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist