From d64ff86fb6be22875cfae054f8a878dbd8b1472b Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Wed, 20 Jun 2018 19:13:03 -0400 Subject: puzzles: resync with upstream This brings the source to upstream commit 506b073 (though I have made some extra commits on top of that). Notably this includes a fix for a double-free bug that I myself introduced upstream. Change-Id: I02671586bbc34d63e05398ee971271fed42538cf --- apps/plugins/puzzles/src/Recipe | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'apps/plugins/puzzles/src/Recipe') diff --git a/apps/plugins/puzzles/src/Recipe b/apps/plugins/puzzles/src/Recipe index fc9bc1b..f94b1f9 100644 --- a/apps/plugins/puzzles/src/Recipe +++ b/apps/plugins/puzzles/src/Recipe @@ -122,12 +122,12 @@ install: done !end !begin nestedvm -.PRECIOUS: %.class -%.class: %.mips - java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \ +%.tmpdir/PuzzleEngine.class: %.mips + mkdir -p $(patsubst %.mips,%,$<).tmpdir + cd $(patsubst %.mips,%,$<).tmpdir && \ + java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \ org.ibex.nestedvm.Compiler -outformat class -d . \ - PuzzleEngine $< - mv PuzzleEngine.class $@ + PuzzleEngine ../$< org: mkdir -p org/ibex/nestedvm/util @@ -136,16 +136,17 @@ org: cp $(NESTEDVM)/build/org/ibex/nestedvm/Runtime*.class org/ibex/nestedvm cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Platform*.class org/ibex/nestedvm/util cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Seekable*.class org/ibex/nestedvm/util + +applet.manifest: echo "Main-Class: PuzzleApplet" >applet.manifest PuzzleApplet.class: PuzzleApplet.java org - javac -source 1.3 -target 1.3 PuzzleApplet.java + javac -source 1.7 -target 1.7 PuzzleApplet.java -%.jar: %.class PuzzleApplet.class org - mv $< PuzzleEngine.class - jar cfm $@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org +%.jar: %.tmpdir/PuzzleEngine.class PuzzleApplet.class applet.manifest org + cd $(patsubst %.jar,%,$@).tmpdir && ln -s ../applet.manifest ../org ../PuzzleApplet*.class . + cd $(patsubst %.jar,%,$@).tmpdir && jar cfm ../$@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org echo '' >$*.html - mv PuzzleEngine.class $< !end # A benchmarking and testing target for the GTK puzzles. -- cgit v1.1