File: Makefile

package info (click to toggle)
fonts-smc-karumbi 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,124 kB
  • sloc: python: 134; makefile: 47; sh: 16; xml: 6
file content (47 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/make -f

fontpath=/usr/share/fonts/truetype/malayalam
fonts=Karumbi-Regular
feature=features/features.fea
PY=python2.7
buildscript=tools/build.py
version=1.1
outdir=build
default: ttf
all: clean ttf webfonts test
.PHONY: ttf
ttf:
	@for font in `echo ${fonts}`;do \
		$(PY) $(buildscript) -t ttf -i $$font.sfd -f $(feature) -v $(version) -o $(outdir);\
	done;

webfonts:woff woff2
woff: ttf
	@rm -rf *.woff
	@for font in `echo ${fonts}`;do \
		$(PY) $(buildscript) -t woff -i $(outdir)/$$font.ttf;\
	done;
woff2: ttf
	@rm -rf *.woff2
	@for font in `echo ${fonts}`;do \
		$(PY) $(buildscript) -t woff2 -i $(outdir)/$$font.ttf;\
	done;

install: ttf
	@for font in `echo ${fonts}`;do \
		install -D -m 0644 $(outdir)/$${font}.ttf ${DESTDIR}/${fontpath}/$${font}.ttf;\
	done;

ifeq ($(shell ls -l $(outdir)/*.ttf 2>/dev/null | wc -l),0)
test: ttf run-test
else
test: run-test
endif

run-test:
	@for font in `echo ${fonts}`; do \
		echo "Testing font $${font}";\
		hb-view $(outdir)/$${font}.ttf --font-size 14 --margin 100 --line-space 1.5 --foreground=333333  --text-file tests/tests.txt --output-file tests/$${font}.pdf;\
	done;
clean:
	@rm -rf *.otf *.ttf *.woff *.woff2 *.sfd-* tests/*.pdf $(outdir)