aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile33
1 files changed, 22 insertions, 11 deletions
diff --git a/makefile b/makefile
index 8f23d3d..a7b8032 100644
--- a/makefile
+++ b/makefile
@@ -1,31 +1,42 @@
1pkg := oldstandard 1pkg := oldstandard
2ver := $(shell grep '\\edef\\pkgver' $(pkg).tex | grep -Eo '[0-9]?\.[0-9]?') 2ver := $(shell grep '\\edef\\pkgver' $(pkg).tex | grep -Eo '[0-9]{1,}\.[0-9]{1,}[a-z]{,1}')
3TEXMFDIR := $(shell kpsewhich -expand-var='$$TEXMFHOME') 3TEXMFDIR := $(shell kpsewhich -expand-var='$$TEXMFHOME')
4HOMEDIR := $$HOME 4HOMEDIR := $$HOME
5LOCALFONTDIR := $(HOMEDIR)/.local/share/fonts 5LOCALFONTDIR := $(HOMEDIR)/.local/share/fonts
6 6
7doc: local 7doc: local
8 lualatex --shell-escape $(pkg).tex 8 @echo "Building the documentation. Please wait..."
9 biber $(pkg) 9 lualatex --shell-escape $(pkg).tex >/dev/null
10 lualatex --shell-escape $(pkg).tex 10 biber $(pkg) >/dev/null
11 lualatex --shell-escape $(pkg).tex 11 lualatex --shell-escape $(pkg).tex >/dev/null
12 lualatex --shell-escape $(pkg).tex >/dev/null
13 @echo "Removing OldStandard .otf files from $(LOCALFONTDIR)..."
14 rm -f $(LOCALFONTDIR)/OldStandard-*.otf
15 luaotfload-tool --update
16 @echo "Done."
12 17
13all: doc 18all: doc
14 19
15local: clean 20local:
21 @rm -f $(LOCALFONTDIR)/OldStandard-*.otf
22 @echo "Installing latest OldStandard .otf files in $(LOCALFONTDIR)..."
16 cp otf/OldStandard-*.otf $(LOCALFONTDIR)/ 23 cp otf/OldStandard-*.otf $(LOCALFONTDIR)/
17 luaotfload-tool --update 24 luaotfload-tool --update
25 @echo "Done."
18 26
19package: doc 27package: doc
20 mkdir $(pkg) 28 mkdir $(pkg)-$(ver)
21 cp *.{txt,md,tex,pdf} $(pkg) 29 cp *.{txt,md,tex,pdf} $(pkg)-$(ver)
22 cp otf/*.otf $(pkg) 30 cp otf/*.otf $(pkg)-$(ver)
23 tar czf $(pkg)-$(ver).tar.gz $(pkg) 31 tar czf $(pkg)-$(ver).tar.gz $(pkg)-$(ver)
32 @echo "$(pkg)-$(ver).tar.gz has been created."
24 33
25clean: 34clean:
35 @echo "Removing OldStandard .otf files from $(LOCALFONTDIR)..."
26 rm -f $(LOCALFONTDIR)/OldStandard-*.otf 36 rm -f $(LOCALFONTDIR)/OldStandard-*.otf
27 luaotfload-tool --update 37 luaotfload-tool --update
28 git clean -df 38 git clean -df
29 pandoc README.md -o about.html 39 pandoc README.md -o about.html
40 @echo "Done."
30 41
31.PHONY: doc all local package clean prepare 42.PHONY: doc all local package clean