Oops I've also noticed that I was violating Paul's rule no. 2
as I didn't have the file named $(BUILD)/'Pref$$1.class' (incl. quotes).
And thus Pref.jar was getting rebuilt every time.
So here is what I've ended up with sofar (still ugly):
CLASSES = $(CLIENT:%.java=$(BUILD)/%.class)
Pref.jar: $(MEDIA) $(CLASSES) $(BUILD)/Pref$$1.class
jar cvf $@ $(addprefix media/, $(MEDIA)) \
$(addprefix -C $(BUILD) , $(notdir $(CLASSES))) \
-C $(BUILD) 'Pref$$1.class'
$(BUILD)/Pref$$1.class: Pref.java
$(JAVAC) $(JFLAGS) -d $(dir $@) \
-classpath $(dir $@) -sourcepath $(dir $<) $<
$(BUILD)/%.class: %.java
$(JAVAC) $(JFLAGS) -d $(dir $@) \
-classpath $(dir $@) -sourcepath $(dir $<) $<
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make