Makefile (view raw)
1FONT_NAME=Putnik
2FONT_VERSION=$(shell git describe --abbrev=4)
3RELEASE=$(FONT_NAME)-$(FONT_VERSION)
4PYTHON=/usr/bin/python3
5VENV_BIN=venv/bin
6FONTMAKE=$(VENV_BIN)/fontmake
7OUT_DIR=fonts
8UFO_SRC=sources/$(FONT_NAME).ufo
9TTF=fonts/ttf/$(FONT_NAME).ttf
10OTF=fonts/otf/$(FONT_NAME).otf
11
12all: ttf otf
13
14venv:
15 $(PYTHON) -m venv venv
16 $(VENV_BIN)/pip install -r requirements.txt
17
18ttf: venv $(TTF)
19$(TTF): $(UFO_SRC)
20 $(FONTMAKE) -u $(UFO_SRC) -o ttf --output-dir fonts/ttf/
21
22otf: venv $(OTF)
23$(OTF): $(UFO_SRC)
24 $(FONTMAKE) -u $(UFO_SRC) -o otf --output-dir fonts/otf/
25
26release: release-tar release-zip
27
28release-tar: ttf otf
29 tar -cvf $(RELEASE).tar.gz $(OTF) $(TTF) LICENSE
30
31release-zip: ttf otf
32 zip -j $(RELEASE).zip $(OTF) $(TTF) LICENSE
33
34clean:
35 -rm $(TTF) $(OTF) *.zip *.tar.gz
36
37.PHONY: all release venv clean