vorlagen-muendliche-pruefungen/Makefile

36 lines
822 B
Makefile
Raw Permalink Normal View History

# 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
2025-09-11 21:04:06 +02:00
PACKAGE_NAME = fsmi-exam-report
PACKAGE_VERSION = 0.1.0
PREFIX ?= $(HOME)/.local/share/typst/packages/local
INSTALLDIR = $(PREFIX)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)
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})))
2025-09-11 21:04:06 +02:00
.PHONY: install
install:
mkdir -p ${INSTALLDIR}
cp -r * ${INSTALLDIR}
.PHONY: uninstall
uninstall:
rm -rf ${INSTALLDIR}