mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Fix Makefile.nestedvm so that it works with make -j.
Instead of repeatedly reusing the file name 'PuzzleEngine.class' in the main build directory, now each puzzle's NestedVM translation is left in a separate subdirectory so that they don't collide with each other. A bonus is that we don't have to rename the file back and forth between the rule that builds it and the one that consumes it.
This commit is contained in:
19
Recipe
19
Recipe
@ -122,12 +122,12 @@ install:
|
|||||||
done
|
done
|
||||||
!end
|
!end
|
||||||
!begin nestedvm
|
!begin nestedvm
|
||||||
.PRECIOUS: %.class
|
%.tmpdir/PuzzleEngine.class: %.mips
|
||||||
%.class: %.mips
|
mkdir -p $(patsubst %.mips,%,$<).tmpdir
|
||||||
java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \
|
cd $(patsubst %.mips,%,$<).tmpdir && \
|
||||||
|
java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \
|
||||||
org.ibex.nestedvm.Compiler -outformat class -d . \
|
org.ibex.nestedvm.Compiler -outformat class -d . \
|
||||||
PuzzleEngine $<
|
PuzzleEngine ../$<
|
||||||
mv PuzzleEngine.class $@
|
|
||||||
|
|
||||||
org:
|
org:
|
||||||
mkdir -p org/ibex/nestedvm/util
|
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/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/Platform*.class org/ibex/nestedvm/util
|
||||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Seekable*.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
|
echo "Main-Class: PuzzleApplet" >applet.manifest
|
||||||
|
|
||||||
PuzzleApplet.class: PuzzleApplet.java org
|
PuzzleApplet.class: PuzzleApplet.java org
|
||||||
javac -source 1.7 -target 1.7 PuzzleApplet.java
|
javac -source 1.7 -target 1.7 PuzzleApplet.java
|
||||||
|
|
||||||
%.jar: %.class PuzzleApplet.class org
|
%.jar: %.tmpdir/PuzzleEngine.class PuzzleApplet.class applet.manifest org
|
||||||
mv $< PuzzleEngine.class
|
cd $(patsubst %.jar,%,$@).tmpdir && ln -s ../applet.manifest ../org ../PuzzleApplet*.class .
|
||||||
jar cfm $@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org
|
cd $(patsubst %.jar,%,$@).tmpdir && jar cfm ../$@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org
|
||||||
echo '<applet archive="'$@'" code="PuzzleApplet" width="700" height="500"></applet>' >$*.html
|
echo '<applet archive="'$@'" code="PuzzleApplet" width="700" height="500"></applet>' >$*.html
|
||||||
mv PuzzleEngine.class $<
|
|
||||||
!end
|
!end
|
||||||
|
|
||||||
# A benchmarking and testing target for the GTK puzzles.
|
# A benchmarking and testing target for the GTK puzzles.
|
||||||
|
Reference in New Issue
Block a user