[llvm-commits] CVS: llvm-java/test/Makefile.test
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat Jul 24 13:05:52 PDT 2004
Changes in directory llvm-java/test:
Makefile.test updated: 1.10 -> 1.11
---
Log message:
Generate class files in Output/.
Add rules to run .class files with the native jvm.
---
Diffs of the changes: (+12 -4)
Index: llvm-java/test/Makefile.test
diff -u llvm-java/test/Makefile.test:1.10 llvm-java/test/Makefile.test:1.11
--- llvm-java/test/Makefile.test:1.10 Sat Jul 24 14:12:10 2004
+++ llvm-java/test/Makefile.test Sat Jul 24 15:05:42 2004
@@ -12,12 +12,12 @@
.PHONY: clean
clean::
- $(RM) -f a.out core *.class .class-stamp
+ $(RM) -f a.out core
$(RM) -rf Output/
# we don't want these files to be deleted by make, even if they are
# intermediate results
-.PRECIOUS: Output/.dir %.bc %.ll %.llvm.bc %.llvm %.class
+.PRECIOUS: Output/.dir Output/%.class %.bc %.ll %.llvm.bc %.llvm
#rule to link in runtime to raw bytecode
%.linked.bc: %.raw.bc $(LEVEL)/runtime/runtime.bc
@@ -28,5 +28,13 @@
$(LDIS) < $< > $@
# rule to compile java source
-%.class: %.java
- $(JAVAC) $<
+Output/%.class: %.java Output/.dir
+ $(JAVAC) -d Output $<
+
+# rule to run a .class file with the jvm
+%.out-nat: %.class
+ $(JAVA) -cp Output $(subst /,.,$(subst Output/,,$*)) > $*.out-nat || rm -f $*.out-nat
+
+# rule to run a .class file with the llvm jit
+%.out-jit: %.llvm.bc
+ $(LLI) $< > $*.out-nat || rm -f $*.out-nat
More information about the llvm-commits
mailing list