Skip to content

Commit

Permalink
Fixes PDF manual build. #6
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhoadley committed Mar 18, 2012
1 parent 723c49a commit e30fd18
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
24 changes: 6 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * docs: Builds Javadoc API documentation
# * tests: Runs tests
# * clean: Cleans up
# * manual: Builds a PDF manual in the doc subdirectory (requires LaTeX)

# Javadocs
DOCDIR= html
Expand All @@ -15,12 +16,6 @@ JAVADOCOPTS= -version -author -windowtitle "PAL Machine Simulator" \
JARFILE= PAL.jar
JAROPTS= -cm -C src -f

# Manual
PS2PDF= ps2pdf
DVIPS= dvips
LATEX= latex
GPIC= pic

# Tests
SIMPLETESTS= $(filter-out %.out %.ref, $(wildcard test/basic/*))
INPUTTESTS= $(filter-out %.in %.out %.ref, $(wildcard test/interactive/*))
Expand All @@ -31,16 +26,6 @@ compile:
mkdir -p bin
javac -d bin ${JAVA_SOURCE}

stackframe.tex: stackframe.pic
${GPIC} -t stackframe.pic > stackframe.tex

PAL.pdf: PAL.tex stackframe.tex
${LATEX} PAL.tex
${LATEX} PAL.tex
${LATEX} PAL.tex
${DVIPS} PAL.dvi -Ppdf -o PAL.ps
${PS2PDF} PAL.ps

.PHONY: clean
clean:
rm -rf bin
Expand All @@ -50,14 +35,17 @@ clean:
rm -f ${JARFILE}
rm -f jar-manifest
rm -f ${TARBALL}
rm -f PAL.aux PAL.dvi PAL.lof PAL.log PAL.lot PAL.pdf PAL.ps PAL.toc
rm -f stackframe.tex
make -C doc clean

.PHONY: docs
docs:
mkdir -p ${DOCDIR}
javadoc ${JAVADOCOPTS} net.logicsquad.pal

.PHONY: manual
manual:
make -C doc PAL.pdf

.PHONY: jar
jar: compile
echo "Main-class: net/logicsquad/pal/PAL" > jar-manifest
Expand Down
13 changes: 13 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
stackframe.tex: stackframe.pic
pic -t stackframe.pic > stackframe.tex

PAL.pdf: PAL.tex stackframe.tex
latex PAL.tex
latex PAL.tex
latex PAL.tex
dvips PAL.dvi -Ppdf -o PAL.ps
ps2pdf PAL.ps

clean:
rm -f PAL.aux PAL.dvi PAL.lof PAL.log PAL.lot PAL.pdf PAL.ps PAL.toc
rm -f stackframe.tex

0 comments on commit e30fd18

Please sign in to comment.