aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-11-18 11:13:28 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-11-18 11:16:16 +0300
commit061af291ff6117ff015f9192855bd00b19fd9ea8 (patch)
treeb73b82850365e16e22cc018f0f99966e1e2c105b /Makefile
parent3085cb9d40abeb4d25299b86145e007cd9fac712 (diff)
downloadPutnik-061af291ff6117ff015f9192855bd00b19fd9ea8.tar.gz
Putnik-061af291ff6117ff015f9192855bd00b19fd9ea8.zip
add requirements.txt and simplify build
now everything is happening inside vitrual environment, which is much more safe and easier to use.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a07ae3c..c25ddf1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
FONT_NAME=Putnik
FONT_VERSION=$(shell git describe --abbrev=4)
RELEASE=$(FONT_NAME)-$(FONT_VERSION)
+PYTHON=/usr/bin/python
+VENV_BIN=venv/bin
+FONTMAKE=$(VENV_BIN)/fontmake
OUT_DIR=fonts
UFO_SRC=sources/$(FONT_NAME).ufo
TTF=fonts/ttf/$(FONT_NAME).ttf
@@ -8,13 +11,17 @@ OTF=fonts/otf/$(FONT_NAME).otf
all: ttf otf
-ttf: $(TTF)
+venv:
+ $(PYTHON) -m venv venv
+ $(VENV_BIN)/pip install -r requirements.txt
+
+ttf: venv $(TTF)
$(TTF): $(UFO_SRC)
- fontmake -u $(UFO_SRC) -o ttf --output-dir fonts/ttf/
+ $(FONTMAKE) -u $(UFO_SRC) -o ttf --output-dir fonts/ttf/
-otf: $(OTF)
+otf: venv $(OTF)
$(OTF): $(UFO_SRC)
- fontmake -u $(UFO_SRC) -o otf --output-dir fonts/otf/
+ $(FONTMAKE) -u $(UFO_SRC) -o otf --output-dir fonts/otf/
release: release-tar release-zip
@@ -27,4 +34,4 @@ release-zip: ttf otf
clean:
-rm $(TTF) $(OTF) $(RELEASE).*
-.PHONY: all release clean
+.PHONY: all release venv clean