diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a5735c3 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Define the source .typ files and the target PDF names +TYP_FILES := $(wildcard *.typ) +PDF_FILES := $(TYP_FILES:.typ=.pdf) +PREFIXED_PDFS := $(addprefix danielchen_, $(PDF_FILES)) + +# Rule to build all PDFs with the "danielchen_" prefix +all: $(PREFIXED_PDFS) + +danielchen_%.pdf: %.typ + typst compile $< $@ + +# Rule for watching all .typ files concurrently +watch: + @$(foreach file, $(TYP_FILES), \ + (typst watch $(file) danielchen_$(basename $(file)).pdf &) ; \ + ) + @wait + +# Cleanup rule +clean: + rm -f danielchen_*.pdf