Skip to content
Snippets Groups Projects
Commit 7649490e authored by Karl Fogel's avatar Karl Fogel
Browse files

Stop doing the "symlink to rev-labeled PDF" trick

Before now, building "foo.pdf" would instead build "foo-rREVNUM.pdf"
(where REVNUM is determined by 'get_revision') and symlink "foo.pdf"
to that.  Although this had its uses, it also would occasionally cause
problems, primarily accidentally copying the symlink to somewhere else
and ending up with a broken symlink at the destination.  After
discussing it yesterday, James and I decided to switch to the simpler
"just build foo.pdf" method, and that's what this commit does.
parent 1062f84a
No related branches found
No related tags found
No related merge requests found
# LaTeX Makefile
# Find 'get_revision', used to get the current SVN (or Git) revision.
# This script is required for 'make foo.draft.pdf' -- if get_revision
# is not found somewhere, that rule will fail.
REVBIN := $(OTS_DOCTOOLS_DIR)/get_revision
ifeq ("$(wildcard $(REVBIN))","")
REVBIN := $(shell find . -type f -name get_revision -print -quit)
endif
REVBIN := $(shell ${REVBIN})
PYTHON_PROVIDES := $(shell sed 's/^python-//' ${OTS_DOCTOOLS_DIR}/requirements.txt | xargs echo | sed "s/ /, /g")
LTX=$(wildcard *.ltx)
......@@ -88,12 +79,7 @@ all-redacted:
@cp $${OTS_DOCTOOLS_DIR}/latex/*.svg .
@# The '-shell-escape' here is a kluge; see issue 12 (part 2).
latexmk -pdf -pdflatex=$(PDFLATEX) -halt-on-error -shell-escape $(<:.ltx=.tex)
@rm -f $(@:.pdf=-$(REVBIN).pdf)
@mv $@ $(@:.pdf=-$(REVBIN).pdf)
@ln -sf $(@:.pdf=-$(REVBIN).pdf) $@
@cp $< $(<:.ltx=.knowngood) # for diffing broken builds to find bugs
@${PIPELINE} $< -o stage post
# This builds a draft. This only works if you're using the jinja
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment