Debian Codegraph @

Makefile

raw
1 DRAWBOT_SCRIPTS=$(shell ls documentation/*.py)
2 DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g')
3
4 help:
5 @echo "###"
6 @echo "# Build targets for UD Gothic"
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 " make images: Creates PNG specimen images in the documentation/ directory"
13 @echo
14
15 build: build.stamp
16
17 venv: venv/touchfile
18
19 build.stamp: venv .init.stamp sources/build.py
20 . venv/bin/activate; rm -rf fonts/; python3 sources/build.py && touch build.stamp
21
22 .init.stamp: venv
23 . venv/bin/activate; python3 scripts/first-run.py
24
25 venv/touchfile: requirements.txt
26 test -d venv || python3 -m venv venv
27 . venv/bin/activate; pip install -Ur requirements.txt
28 touch venv/touchfile
29
30 test: venv build.stamp
31 . venv/bin/activate; mkdir -p out/ out/fontbakery; fontbakery check-googlefonts -l WARN --succinct --badges out/badges --html out/fontbakery/fontbakery-report.html --ghmarkdown out/fontbakery/fontbakery-report.md $(shell find fonts/ttf -type f)
32
33 proof: venv build.stamp
34 . venv/bin/activate; mkdir -p out/ out/proof; gftools gen-html proof $(shell find fonts/ttf -type f) -o out/proof
35
36 images: venv build.stamp $(DRAWBOT_OUTPUT)
37 git add documentation/*.png && git commit -m "Rebuild images" documentation/*.png
38
39 %.png: %.py build.stamp
40 python3 $< --output $@
41
42 clean:
43 rm -rf venv
44 find . -name "*.pyc" | xargs rm delete
45
46 update-ufr:
47 npx update-template https://github.com/googlefonts/Unified-Font-Repository/
48
49 update:
50 pip install --upgrade $(dependency); pip freeze > requirements.txt