Skip to content

Commit

Permalink
Adding a cleanup to prevent overwriting the output files (fixes hmemc…
Browse files Browse the repository at this point in the history
  • Loading branch information
hmemcpy committed Mar 29, 2020
1 parent 5b52ac6 commit 78971a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ TEXFILES = $(TOPTEXFILES) $(SCALATEXFILES) $(OCAMLTEXFILES) $(OPTFILES)
default: suffix=''
default: out-dir $(DEFAULTPDF) # todo cover

all: default scala ocaml
all: clean default scala ocaml

scala: suffix='-scala'
scala: out-dir version.tex $(SCALAPDF)
scala: clean out-dir version.tex $(SCALAPDF)

ocaml: suffix='-ocaml'
ocaml: out-dir version.tex $(OCAMLPDF)
ocaml: clean out-dir version.tex $(OCAMLPDF)

# Main targets
$(TOPPDFFILES) : %.pdf : %.tex $(TEXFILES)
if which latexmk > /dev/null 2>&1 ;\
then \
latexmk -shell-escape -interaction=nonstopmode -halt-on-error -norc -jobname=ctfp -pdflatex="xelatex %O %S" -pdfxe $< ;\
latexmk -shell-escape -interaction=nonstopmode -halt-on-error -norc -jobname=ctfp -pdflatex="xelatex %O %S" -pdf $< ;\
mv ctfp.pdf ../out/$(GIT_VER)/$(subst ctfp,$(OUTPUT),$(subst ctfp-reader,$(OUTPUT),$*)).pdf ;\
else @printf "Error: unable to find latexmk. Is it installed?\n" ;\
fi
Expand Down

0 comments on commit 78971a9

Please sign in to comment.