-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathMakefile
58 lines (48 loc) · 1.41 KB
/
Makefile
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
48
49
50
51
52
53
54
55
56
57
# bmake syntax. Packaged as "pmake" for some systems, "bmake" for others,
# native make(1) for BSDs. Or if you don't have a package, get it here:
# http://www.crufty.net/help/sjg/bmake.html
FAMILY?= Crimson
FACES+= Bold
FACES+= BoldItalic
FACES+= Italic
FACES+= Roman
FACES+= Semibold
FACES+= SemiboldItalic
EXTS+= otf
EXTS+= ttf
EXTS+= woff
EXTS+= eot
EXTS+= svg
SRC?= Source Files
OUT?= Desktop Fonts
AWK?= awk
GREP?= grep
FONTFORGE?= fontforge
GSED?= sed
ESED?= ${GSED} -E
MOVE?= mv
MKDIR?= mkdir -p
# XXX: depend on ${OUT}/OTF for mkdir, but spaces in filename
# XXX: generate in-situ, and get rid of ${MOVE}
.for face in ${FACES}
. for ext in ${EXTS}
all::
bin/generate.pe ${ext} "${SRC}/${FAMILY}-${face}.sfd"
${MKDIR} "${OUT}/${ext:tu}"
${MOVE} "${SRC}/${FAMILY}-${face}.${ext}" "${OUT}/${ext:tu}"
. endfor
.endfor
clean::
# comment out glyphs in the ik/*.fea files which do not exist in *.sfd
# XXX: this leaves references inside @_ classes for now
.for face in ${FACES}
mergefea:: # XXX: spaces in ${SRC}: ${SRC}/${FAMILY}-${face}.sfd
bin/mergefea.pe "${SRC}/${FAMILY}-${face}.sfd" 2>&1 \
| ${GREP} non-existent \
| ${AWK} '{print $$9}' \
| while read l; do \
${GSED} -ie $$l's/^/#/' "${SRC}/ik/${FAMILY}-${face}#00_ik.fea"; \
done; \
${ESED} -ie '/@_/ s/^#+//' "${SRC}/ik/${FAMILY}-${face}#00_ik.fea"
bin/mergefea.pe "${SRC}/${FAMILY}-${face}.sfd"
.endfor