36 lines
822 B
Makefile
36 lines
822 B
Makefile
# 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
|
|
|
|
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})))
|
|
|
|
.PHONY: install
|
|
install:
|
|
mkdir -p ${INSTALLDIR}
|
|
cp -r * ${INSTALLDIR}
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
rm -rf ${INSTALLDIR}
|
|
|