1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 06:24:19 +00:00
pds-2021-g2-nest/docs/build/latex/Makefile

64 lines
1.5 KiB
Makefile
Raw Normal View History

2021-05-30 12:34:19 +00:00
# Makefile for Sphinx LaTeX output
ALLDOCS = $(basename $(wildcard *.tex))
ALLPDF = $(addsuffix .pdf,$(ALLDOCS))
ALLDVI = $(addsuffix .dvi,$(ALLDOCS))
ALLXDV =
ALLPS = $(addsuffix .ps,$(ALLDOCS))
# Prefix for archive names
ARCHIVEPREFIX =
# Additional LaTeX options (passed via variables in latexmkrc/latexmkjarc file)
export LATEXOPTS ?=
# Additional latexmk options
LATEXMKOPTS ?=
# format: pdf or dvi (used only by archive targets)
FMT = pdf
LATEX = latexmk -dvi
PDFLATEX = latexmk -pdf -dvi- -ps-
%.dvi: %.tex FORCE_MAKE
$(LATEX) $(LATEXMKOPTS) '$<'
%.ps: %.dvi
dvips '$<'
%.pdf: %.tex FORCE_MAKE
$(PDFLATEX) $(LATEXMKOPTS) '$<'
all: $(ALLPDF)
all-dvi: $(ALLDVI)
all-ps: $(ALLPS)
all-pdf: $(ALLPDF)
zip: all-$(FMT)
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
tar: all-$(FMT)
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
gz: tar
gzip -9 < $(ARCHIVEPREFIX)docs-$(FMT).tar > $(ARCHIVEPREFIX)docs-$(FMT).tar.gz
bz2: tar
bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
xz: tar
xz -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
clean:
rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz $(ALLPDF) $(ALLDVI) $(ALLXDV) *.fls *.fdb_latexmk
.PHONY: all all-pdf all-dvi all-ps clean zip tar gz bz2 xz
.PHONY: FORCE_MAKE