diff options
author | orangerot <orangerot@orangerot.dev> | 2025-09-11 20:04:13 +0200 |
---|---|---|
committer | orangerot <orangerot@orangerot.dev> | 2025-09-11 20:04:13 +0200 |
commit | dc49755cb6b596dd57ac1bfa9a8d33174d22102f (patch) | |
tree | 46d672c448b0ebbb4422db0e23960032707f13a4 /Makefile | |
parent | 73467ecd31e34096e1ac1f7968e39e6151701f9a (diff) |
feat: Makefile to build distributable archives for each template
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0d3c356 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2025 Gero Beckmann <orangerot@orangerot.dev> +# +# SPDX-License-Identifier: MIT + +TEMPLATES = muendliche-pruefung muendliche-nachpruefung muendliche-pruefung-mathematik +FILES = README.md main.typ lib.typ $1.typ $1.pdf + +dist: $(addsuffix .tar.gz,${TEMPLATES}) + mkdir -p dist + mv $^ dist + +define make-archive +$1.tar.gz: $(addprefix $1/,${FILES}) + tar -vczf $1.tar.gz $$^ +endef + +%.pdf: %.typ + typst compile $^ + +$(foreach template,${TEMPLATES},$(eval $(call make-archive,${template}))) + |