Makefile.am 1.9 KB
Newer Older
B
Behdad Esfahbod 已提交
1 2
include Makefile.decl

B
Behdad Esfahbod 已提交
3
NULL =
4 5 6
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
B
Behdad Esfahbod 已提交
7

B
Behdad Esfahbod 已提交
8
if HAVE_GLIB
9 10
AM_CPPFLAGS = -I$(top_srcdir)/src/ $(GLIB_CFLAGS) $(GTHREAD_CFLAGS)
LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS) $(GTHREAD_LIBS)
B
Behdad Esfahbod 已提交
11

12 13
EXTRA_DIST += hb-test.h

B
Behdad Esfahbod 已提交
14
check_PROGRAMS = $(TEST_PROGS)
B
Behdad Esfahbod 已提交
15
noinst_PROGRAMS = $(TEST_PROGS)
B
Behdad Esfahbod 已提交
16

B
Behdad Esfahbod 已提交
17
TEST_PROGS += \
B
Behdad Esfahbod 已提交
18
	test-blob \
B
Behdad Esfahbod 已提交
19
	test-buffer \
20
	test-common \
21
	test-font \
22
	test-object \
23
	test-shape \
24
	test-unicode \
25
	test-version \
B
Behdad Esfahbod 已提交
26 27
	$(NULL)

28 29 30
TEST_PROGS += \
	test-ot-tag \
	$(NULL)
B
Behdad Esfahbod 已提交
31

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
# Tests for header compilation
TEST_PROGS += \
	test-c \
	test-cplusplus \
	$(NULL)
test_cplusplus_SOURCES = test-cplusplus.cc
test_c_CPPFLAGS = $(AM_CPPFLAGS)
test_cplusplus_CPPFLAGS = $(AM_CPPFLAGS)
if HAVE_ICU
test_c_CPPFLAGS += $(ICU_CFLAGS)
test_cplusplus_CPPFLAGS += $(ICU_CFLAGS)
endif
if HAVE_FREETYPE
test_c_CPPFLAGS += $(FREETYPE_CFLAGS)
test_cplusplus_CPPFLAGS += $(FREETYPE_CFLAGS)
47 48 49
# TODO replace freetype with other stuff in the following test
test_object_CPPFLAGS = $(AM_CPPFLAGS) $(FREETYPE_CFLAGS)
test_object_LIBS = $(LDADD) $(FREETYPE_LIBS)
50 51
endif

B
Behdad Esfahbod 已提交
52

53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
# test-symbols: Finds untested API symbols
symbols-tested.txt: $(TEST_PROGS)
	$(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
	| grep ' U hb_' | sed 's/.* U hb_/hb_/' \
	| sort | uniq > $@.tmp && mv $@.tmp $@
symbols-exported.txt: $(top_builddir)/src/.libs/libharfbuzz.so
	$(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
	| grep ' T ' | sed 's/.* T //' | grep -v '^\(_init\|_fini\)$$' \
	| sort | uniq > $@.tmp && mv $@.tmp $@
symbols-untested.txt: symbols-tested.txt symbols-exported.txt
	$(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
CLEANFILES += symbols-tested.txt symbols-exported.txt symbols-untested.txt
test-symbols: symbols-untested.txt
	@! cat $^ | grep .


B
Behdad Esfahbod 已提交
69 70 71 72 73 74
else
check-am:
	@echo "You need to have glib support enabled to run the tests"
	@exit 77
endif

75 76
.PHONY: test-symbols

B
Behdad Esfahbod 已提交
77
-include $(top_srcdir)/git.mk