Files
collection/Makefile
T
2026-05-07 21:57:10 +02:00

38 lines
489 B
Makefile

SRC_DIR := ./
OUT_DIR := ./output
SRC := $(wildcard *.md)
PDF := $(addprefix $(OUT_DIR)/, $(SRC:.md=.pdf))
PANDOC_OPT := --template ./template.tex \
--pdf-engine pdflatex \
--listings
MK_DIR := $(OUT_DIR)
.PHONY: all clean test
all: $(PDF)
clean:
rm -f $(MK_DIR)
test:
@echo "$(SRC)" | sed 's/ /\n/g'
$(OUT_DIR)/%.pdf: %.md $(MK_DIR)
@pandoc $(PANDOC_OPT) \
-o $@ \
$<
$(MK_DIR):
mkdir -p $@