| 1 |
# $Id: Makefile,v 1.8 2010-04-06 19:33:54 Stevan_White Exp $ |
| 2 |
|
| 3 |
SFDS=FreeMonoBoldOblique.sfd FreeMonoBold.sfd FreeMonoOblique.sfd FreeMono.sfd \ |
| 4 |
FreeSansBoldOblique.sfd FreeSansBold.sfd FreeSansOblique.sfd FreeSans.sfd \ |
| 5 |
FreeSerifBoldItalic.sfd FreeSerifBold.sfd FreeSerifItalic.sfd FreeSerif.sfd |
| 6 |
MSFDS=FreeMonoBoldOblique.sfd FreeMonoBold.sfd FreeMonoOblique.sfd FreeMono.sfd |
| 7 |
TTFS=$(SFDS:.sfd=.ttf) |
| 8 |
OTFS=$(SFDS:.sfd=.otf) |
| 9 |
WOFFS=$(SFDS:.sfd=.woff) |
| 10 |
FF=fontforge -lang=ff -script |
| 11 |
FFPY=fontforge -lang=py -script |
| 12 |
FFPY=fontforge -lang=py -script |
| 13 |
|
| 14 |
ffversion=`fontforge --version 2> /dev/null | grep '^fontforge' | sed -e 's/^fontforge //'` |
| 15 |
|
| 16 |
TESTFF=if test -z ${ffversion}; then echo FontForge program is required to build FreeFont; exit 1; fi; if test `fontforge --version 2> /dev/null | grep '^fontforge' | sed -e 's/^fontforge //'` -lt 20080429 ; then echo FontForge version too old; exit 1; fi |
| 17 |
|
| 18 |
|
| 19 |
.SUFFIXES: $(SUFFIXES) .sfd .ttf .otf .woff |
| 20 |
|
| 21 |
%.otf : %.sfd |
| 22 |
@ $(TESTFF) |
| 23 |
@ ( $(FFPY) ../tools/generate/OpenType $< 3>&1 1>&2 2>&3 | tail -n +4 ) 3>&1 1>&2 2>&3 2>&1 |
| 24 |
|
| 25 |
%.ttf : %.sfd |
| 26 |
@ $(TESTFF) |
| 27 |
@ ( $(FFPY) ../tools/generate/TrueType $< 3>&1 1>&2 2>&3 | tail -n +4 ) 3>&1 1>&2 2>&3 2>&1 |
| 28 |
|
| 29 |
%.woff : %.sfd |
| 30 |
@ $(TESTFF) |
| 31 |
@ ( $(FFPY) ../tools/generate/WOFF $< 3>&1 1>&2 2>&3 | tail -n +4 ) 3>&1 1>&2 2>&3 2>&1 |
| 32 |
|
| 33 |
all: ttf otf woff |
| 34 |
|
| 35 |
ttf: $(TTFS) |
| 36 |
|
| 37 |
otf: $(OTFS) |
| 38 |
|
| 39 |
woff: $(WOFFS) |
| 40 |
|
| 41 |
tests: |
| 42 |
@ $(TESTFF) |
| 43 |
@ ( $(FFPY) ../tools/test/isMonoMono.py $(MSFDS) 3>&1 1>&2 2>&3 | tail -n +4 ) 3>&1 1>&2 2>&3 2>&1 |
| 44 |
@ $(FFPY) ../tools/test/checkGlyphNumbers.py `pwd` $(SFDS) 2>&1 |
| 45 |
@ $(FFPY) ../tools/test/validate.py 2>&1 |
| 46 |
|
| 47 |
clean: |
| 48 |
rm -f $(TTFS) $(OTFS) $(WOFFS) build.log |
| 49 |
|
| 50 |
distclean: |
| 51 |
rm -f $(TTFS) $(OTFS) $(WOFFS) build.log |