25 lines
467 B
Makefile
25 lines
467 B
Makefile
SOURCE = main.typ
|
|
OUTPUT = main.pdf
|
|
FONTS_DIR = fonts
|
|
VIEWER = zathura
|
|
|
|
TYPST = typst
|
|
|
|
.PHONY: all watch clean
|
|
|
|
# compile PDF
|
|
all: $(OUTPUT)
|
|
|
|
# compile with font path
|
|
$(OUTPUT): $(SOURCE) template.typ
|
|
$(TYPST) compile $(SOURCE) --font-path $(FONTS_DIR)
|
|
|
|
# compile with watch mode
|
|
watch:
|
|
#$(TYPST) watch $(SOURCE) --font-path $(FONTS_DIR)
|
|
($(VIEWER) $(OUTPUT) &) && $(TYPST) watch $(SOURCE) --font-path $(FONTS_DIR)
|
|
|
|
# clean generated files
|
|
clean:
|
|
rm -f $(OUTPUT)
|