diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -15,7 +15,7 @@ LIBPURE = $(PURE)/build/libpure.a SURFACES = surfaces/screen.c surfaces/draw.c surfaces/width.c surfaces/web.c surfaces/pixels.c surfaces/display.c \ surfaces/input.c surfaces/hangul.c surfaces/dbus.c surfaces/access.c surfaces/main.c -.PHONY: all check check-harfbuzz FORCE +.PHONY: all check check-text check-harfbuzz FORCE all: $(BUILD)/vega $(BUILD)/vega-symbols $(BUILD)/vega-surface.so $(BUILD): @@ -69,29 +69,35 @@ $(BUILD)/test-layout: text/test-layout.c $(LAYOUT) text/layout.h text/shape.h te symbols/symbols.h | $(BUILD) $(CC) $(CPPFLAGS) $(CFLAGS) -Itext -Isymbols text/test-layout.c $(LAYOUT) symbols/symbols.c $(LDFLAGS) -lm $(LDLIBS) -o $@ -# Unicode's conformance tests, where the UCD is installed (Debian: unicode-data); -# and shaping, where DejaVu Sans is: the build refuses a file whose shaping -# differs from HarfBuzz's on random runs of Latin, Greek, Cyrillic, Hebrew, -# Arabic and Common text, both ways. -UCD ?= /usr/share/unicode +# Unicode's conformance tests, on the UCD the tables were made from: the one +# text/upstream.py fetches into build/upstream, else the installed one +# (Debian: unicode-data), which test-text passes over when its version is +# not the tables'. And shaping, where DejaVu Sans is: the build refuses a +# file whose shaping differs from HarfBuzz's on random runs of Latin, Greek, +# Cyrillic, Hebrew, Arabic and Common text, both ways. +UNICODE_VERSION := $(shell sed -n '1s/.*Database \([0-9.]*\):.*/\1/p' text/unicode-data.c) +UCD ?= $(if $(wildcard build/upstream/ucd-$(UNICODE_VERSION)/ReadMe.txt),build/upstream/ucd-$(UNICODE_VERSION),/usr/share/unicode) SHAPED_FONT ?= /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf SHAPED_CODES = 0x20-0x7e,0xa0-0x24f,0x300-0x36f,0x370-0x3ff,0x400-0x4ff,0x591-0x5f4,0x600-0x6ff,0x2000-0x206f # HarfBuzz's own shaping tests, where a HarfBuzz release's source is -# (HARFBUZZ_SRC: the same version the build links): each case shaped by -# Vega and by HarfBuzz must agree, but for those text/harfbuzz-suite.known -# lists. -HARFBUZZ_SRC ?= +# (HARFBUZZ_SRC: the same version the build links; build/upstream's, when +# text/upstream.py fetched one): each case shaped by Vega and by HarfBuzz +# must agree, but for those text/harfbuzz-suite.known lists. +HARFBUZZ_SRC ?= $(lastword $(wildcard build/upstream/harfbuzz-*)) check-harfbuzz: $(BUILD)/vega-symbols if [ -d "$(HARFBUZZ_SRC)/test/shape/data" ]; then python3 text/harfbuzz-suite.py $(HARFBUZZ_SRC) $(BUILD)/vega-symbols; \ else echo "no HarfBuzz source at HARFBUZZ_SRC: its test suite skipped"; fi -check: $(BUILD)/vega $(BUILD)/vega-symbols $(BUILD)/vega-surface.so $(BUILD)/test-text $(BUILD)/test-layout check-harfbuzz +# What text/upstream.py runs against a new HarfBuzz and UCD: the text alone. +check-text: $(BUILD)/vega-symbols $(BUILD)/test-text $(BUILD)/test-layout check-harfbuzz if [ -f $(UCD)/BidiTest.txt ]; then $(BUILD)/test-text $(UCD); else echo "no UCD at $(UCD): text tests skipped"; fi if [ -f $(SHAPED_FONT) ]; then $(BUILD)/vega-symbols build --font $(SHAPED_FONT) --codes $(SHAPED_CODES) \ --shape Latn,Grek,Cyrl,Hebr,Arab,Zyyy --runs 5000 -o $(BUILD)/shaped.vsym && \ $(BUILD)/test-layout $(BUILD)/shaped.vsym; else echo "no $(SHAPED_FONT): shaping tests skipped"; fi if [ -f $(SHAPED_FONT) ] && python3 -c 'import fontTools' 2>/dev/null; then \ python3 text/test-kern.py $(BUILD)/vega-symbols $(SHAPED_FONT); else echo "no fontTools: kern class tests skipped"; fi + +check: $(BUILD)/vega $(BUILD)/vega-surface.so check-text $(MAKE) -C $(AUP) build/aup $(MAKE) -C $(PURE) build/pure-serve python3 tests/check.py --vega $(BUILD)/vega --symbols $(BUILD)/vega-symbols --aup $(AUP)/build/aup --serve $(PURE)/build/pure-serve |
