add makefile for packed builds

This commit is contained in:
2025-11-14 18:52:50 +01:00
parent e77cc73f14
commit ae65a19a99
3 changed files with 18 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ BUNDLE_THESES := bp_cs bp_en dp_cs dp_en prj_cs prj_en
BUNDLE_TARGETS := $(TO_PACK:%=$(BUNDLEDIR)/%) $(BUNDLEDIR)/citations.bib $(BUNDLEDIR)/bp_cs.typ \
$(BUNDLE_THESES:%=$(BUNDLEDIR)/%.typ) $(BUNDLEDIR)/Makefile
PACK_TARGETS := $(TO_PACK:%=$(PACKDIR)/%) $(PACKDIR)/documentation.typ \
$(PACKDIR)/documentation.pdf $(PACKDIR)/citations.bib
$(PACKDIR)/documentation.pdf $(PACKDIR)/citations.bib $(PACKDIR)/Makefile
TEMPLATE_SRCS := $(shell find template -type f)
@@ -108,6 +108,9 @@ $(PACKDIR)/template: | $(PACKDIR)
$(PACKDIR)/template/LICENSE: LICENSE | $(PACKDIR)/template
ln -f $< $@
$(PACKDIR)/Makefile: packed.mk | $(PACKDIR)
ln -f $< $@
$(PACKDIR)/template/tul_citace.csl: template/tul_citace.csl | $(PACKDIR)/template
$(call minify_csl,$<,$@)

13
packed.mk Normal file
View File

@@ -0,0 +1,13 @@
TYPST_FONTPATH := --font-path template/fonts
.PHONY: watch_%
watch_%: %.pdf
xdg-open $< & typst watch $(TYPST_FONTPATH) $*.typ
.PHONY: view_%
view_%: %.pdf
xdg-open $<
.PHONY: %.pdf
%.pdf: %.typ
typst compile $(TYPST_FONTPATH) $<

View File

@@ -9,5 +9,6 @@ watch: $(THESIS_FILE).pdf
view: $(THESIS_FILE).pdf
xdg-open $<
.PHONY: %.pdf
%.pdf: %.typ
typst compile $(TYPST_FONTPATH) $<