[luau] small bug, make or editor?
Ray Strode
halfline at hawaii.rr.com
Mon Jul 15 15:59:00 PDT 2002
Well, I'm not a make expert, but I'll see if I can help. I may be wrong
tho.
[...]
> .SUFFIXES: .java .class
I don't think you need the .SUFFIXES directive. According to the
make manual, this method is deprecated.
[...]
> .java.class:
> $(JC) $(JFLAGS) -classpath $(CLASSPATH) $(CLASSES)
again, this is deprecated.
Okay, I think you can do this:
CLASSPATH = .://home/skunkworks/acme
JFLAGS= -g -deprecation
JC= javac
.PHONY: jar clean
CLASSES= \
AboutDialog.class \
PatternEditor.class \
SingleBit.class \
BitPanel.class \
TimeBit.class \
TimePanel.class \
SimpleBit.class \
SimpleBitPanel.class \
# patedit.class \
entry.class \
comment_entry.class \
integration_entry.class \
metarow_entry.class \
reset_entry.class \
metarow.class \
frame.class \
regular_frame.class \
reset_frame.class \
integration_frame.class \
tag_entry.class \
file_display.class \
time_display.class \
SingleBitEntry.class
all: $(CLASSES)
%.class: %.java
$(JC) $(JFLAGS) -classpath $(CLASSPATH) $<
jar:
jar cmf manifest PatternEditor.jar *.class Acme/JPM/Encoders/*.class
Acme/JP
M/*.class Acme/*.class
clean:
-$(RM) *.class
Note the .PHONY directive. Without it, if you ever created a file
called, "jar"
or "clean" inside the srcdir, then the "jar" or "clean" targets wouldn't
work
(respectively). %.class : %.java is preferred over .java.class from
what I read in
the make manual. For the clean directive, it's better to put a - before
the $(RM),
just in case you don't have any class files (- means make shouldn't care
if the
command returns non-zero exit status.) It actually doesn't matter in
the default
case, I don't think, because $(RM) is normally expanded to "rm -f".
To be honest though, I'm not sure why your makefile doesn't work. It
seems to
have a good dependency list.
--Ray
More information about the LUAU
mailing list