-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) · 1.38 KB
/
Makefile
File metadata and controls
47 lines (37 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
################################################################################
# Copyright 2025, Trusted Computing Group (TCG). #
# All rights reserved. #
# ---------------------------------------------------------------------------- #
# Makefile for locally building TCG Typst documents. #
# ---------------------------------------------------------------------------- #
# Author: Michael Eckel <michael.eckel@sit.fraunhofer.de> #
# Date Modified: 2025-06-10T08:22:42+02:00 #
# Date Created: 2025-06-10T08:22:42+02:00 #
################################################################################
SHELL := /bin/sh
TYPST := typst
RM := rm
EXTRA_BUILD_OPTS = --font-path='./fonts/'
TYPST_FILES := $(wildcard *.typ)
PDF_FILES := $(patsubst %.typ, %.pdf, $(TYPST_FILES))
HTML_FILES := $(patsubst %.typ, %.html, $(TYPST_FILES))
.PHONY: all pdf html clean
all: pdf
pdf: $(PDF_FILES)
html: $(HTML_FILES)
%.pdf: %.typ
$(TYPST) compile \
$(EXTRA_BUILD_OPTS) \
--format='pdf' \
--pdf-standard='a-2b' \
$< \
$@
%.html: %.typ
$(TYPST) compile \
$(EXTRA_BUILD_OPTS) \
--features='html' \
--format='html' \
$< \
$@
clean:
$(RM) $(PDF_FILES) $(HTML_FILES)