Commit 97302777 authored by PoroCYon's avatar PoroCYon
Browse files

add stuff

parents
bin/
obj/
*.pdf
default: all
USE_LATEXMK := $(shell which latexmk >/dev/null 2>&1 && echo 1 || echo 0)
PDFVIEW ?= mupdf
PAGER ?= less
PDFLATEX ?= pdflatex
TARGET := pres
ifneq ($(USE_LATEXMK),0)
LATEXMK ?= latexmk
LATEXMKFLAGS ?= -pdf -Werror -f- -use-make -outdir=../obj/ \
-pdflatex="$(PDFLATEX) -interaction=nonstopmode"
else
PDFLATEXFLAGS ?= -output-directory=../obj/
endif
BIBSRC := $(shell find ref -type f -name "*.bib")
TEXSRC := $(shell find src -type f -name "*.tex")
%/:
@mkdir -vp "$@"
obj/$(TARGET).pdf: src/$(TARGET).tex obj/ $(filter-out src/$(TARGET).tex,$(TEXSRC))
ifneq ($(USE_LATEXMK),0)
cd src && $(LATEXMK) $(LATEXMKFLAGS) "../$<"
else
cd src && $(PDFLATEX) $(PDFLATEXFLAGS) "../$<"
endif
bin/$(TARGET).pdf: obj/$(TARGET).pdf bin/
@cp -v "$<" "$@"
all: bin/$(TARGET).pdf
@cp "$<" "nl21brom.pdf"
clean:
ifneq ($(USE_LATEXMK),0)
$(LATEXMK) -CA $(LATEXMKFLAGS) src/$(TARGET).tex
else
@-$(RM) -v obj/*
endif
@-$(RM) -v bin/$(TARGET).pdf TODO obj/*
view: bin/$(TARGET).pdf
$(PDFVIEW) "$<"
.PHONY: default all clean view todo
todo:
rg -g '*.tex' -F TODO -p -C 2 | tee TODO | $(PAGER) -RS
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment