aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: c19afb8dcab45d7e400178b986e14bebe102cf73 (plain)
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
pkg := oldstandard
ver  := $(shell grep '\\edef\\pkgver' $(pkg).tex | grep -Eo '[0-9]?\.[0-9]?')
TEXMFDIR := $(shell kpsewhich -expand-var='$$TEXMFHOME')
HOMEDIR := $$HOME
LOCALFONTDIR := $(HOMEDIR)/.local/share/fonts

doc: local
	lualatex --shell-escape $(pkg).tex
	biber $(pkg)
	lualatex --shell-escape $(pkg).tex
	lualatex --shell-escape $(pkg).tex

all: doc

local: clean
	cp otf/OldStandard-*.otf $(LOCALFONTDIR)/
	luaotfload-tool --update

package: doc
	mkdir $(pkg)
	cp *.{txt,md,tex,pdf} $(pkg)
	cp otf/*.otf $(pkg)
	tar czf $(pkg)-$(ver).tar.gz $(pkg)

clean:
	rm -f $(LOCALFONTDIR)/OldStandard-*.otf
	luaotfload-tool --update
	git clean -df
	pandoc README.md -o about.html

.PHONY: doc all local package clean