chore: add makefile
This commit is contained in:
parent
cdd0b8e201
commit
37e7f86319
21
Makefile
Normal file
21
Makefile
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user