Skip to content
Snippets Groups Projects
Commit 889dcee2 authored by rohieb's avatar rohieb
Browse files

add a simple Makefile

parent e840abdb
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
#!/usr/bin/make -f
SRCS=$(wildcard \
Mitgliederversammlung*.tex \
Gründungsversammlung*.tex \
Satzung.tex \
Beitragsordnung.tex \
Spaceordnung.tex \
)
JOBNAMES=$(basename $(SRCS))
PDFS=$(addsuffix .pdf,$(JOBNAMES))
LATESTJOB=$(basename $(shell ls -1t $(SRCS) | head -n 1))
define latexmk
latexmk -pdf -dvi- -ps-
endef
all: $(PDFS)
help:
@echo "Available make targets:"
@echo " make, make all -- build PDFs for all .tex documents"
@echo " make clean -- remove all temporary files"
@echo " make mrproper -- remove all temporary and output files"
@echo " make help -- this help"
@echo " make doc.pdf -- build doc.pdf from doc.tex"
@echo " make preview -- build the most recent .tex file, and set PVC=1"
@echo
@echo "Variables:"
@echo " PVC=1 -- when building, start a PDF viewer and poll for updates"
@echo " on the .tex file"
clean:
rm -f $(addsuffix .aux,$(JOBNAMES)) \
$(addsuffix .fdb_latexmk,$(JOBNAMES)) \
$(addsuffix .fls,$(JOBNAMES)) \
$(addsuffix .log,$(JOBNAMES)) \
$(addsuffix .out,$(JOBNAMES)) \
$(addsuffix .toc,$(JOBNAMES))
mrproper: clean
rm -f $(PDFS)
preview:
$(latexmk) -pvc $(LATESTJOB).tex
%.pdf: %.tex
$(latexmk) $(if $(PVC),-pvc,-pvc-) "$<"
# vim: ft=make ts=8 noet
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