Debian Codegraph @

Makefile

raw
1 SOURCES=$(shell yq e '.sources.[] | sub("^","sources/")' sources/config.yaml )
2 FAMILY=$(shell yq e '.familyName' sources/config.yaml )
3
4 help:
5 @echo "###"
6 @echo "# Build targets for $(FAMILY)"
7 @echo "###"
8 @echo
9 @echo " make build: Builds the fonts and places them in the fonts/ directory"
10 @echo " make test: Tests the fonts with fontbakery"
11 @echo " make proof: Creates HTML proof documents in the proof/ directory"
12 @echo
13
14 build: build.stamp sources/config.yaml $(SOURCES)
15
16 venv: venv/touchfile
17
18 build.stamp: venv
19 . venv/bin/activate; gftools builder sources/config.yaml && touch build.stamp
20
21 venv/touchfile: requirements.txt
22 test -d venv || python3 -m venv venv
23 . venv/bin/activate; pip install -Ur requirements.txt
24 touch venv/touchfile
25
26 test: venv build.stamp
27 . venv/bin/activate; fontbakery check-googlefonts --html fontbakery-report.html --ghmarkdown fontbakery-report.md $(shell find fonts -type f)
28
29 proof: venv build.stamp
30 . venv/bin/activate; gftools gen-html proof $(shell find fonts/ttf -type f) -o proof
31
32 clean:
33 rm -rf venv
34 find -iname "*.pyc" -delete