2012-01-19 19:52:02 +00:00
|
|
|
# Process this file with automake to produce Makefile.in
|
|
|
|
|
|
|
|
NULL =
|
|
|
|
EXTRA_DIST =
|
|
|
|
CLEANFILES =
|
|
|
|
DISTCLEANFILES =
|
|
|
|
MAINTAINERCLEANFILES =
|
|
|
|
|
2015-09-01 13:45:46 +00:00
|
|
|
# Convenience targets:
|
|
|
|
lib:
|
|
|
|
@$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src lib
|
2018-07-17 08:59:19 +00:00
|
|
|
libs:
|
|
|
|
@$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src libs
|
2015-09-01 13:45:46 +00:00
|
|
|
|
2018-01-19 12:42:24 +00:00
|
|
|
EXTRA_DIST += CMakeLists.txt
|
|
|
|
|
2018-02-17 01:02:57 +00:00
|
|
|
EXTRA_DIST += fonts
|
|
|
|
|
2018-09-24 17:01:35 +00:00
|
|
|
LINK = $(CXXLINK)
|
|
|
|
|
2012-01-19 19:52:02 +00:00
|
|
|
if HAVE_GLIB
|
2013-03-21 20:26:39 +00:00
|
|
|
AM_CPPFLAGS = -DSRCDIR="\"$(srcdir)\"" -I$(top_srcdir)/src/ -I$(top_builddir)/src/ $(GLIB_CFLAGS)
|
|
|
|
LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS)
|
2012-01-19 19:52:02 +00:00
|
|
|
|
2018-02-12 21:33:55 +00:00
|
|
|
EXTRA_DIST += hb-test.h hb-subset-test.h
|
2012-01-19 19:52:02 +00:00
|
|
|
|
|
|
|
check_PROGRAMS = $(TEST_PROGS)
|
|
|
|
noinst_PROGRAMS = $(TEST_PROGS)
|
|
|
|
|
|
|
|
TEST_PROGS = \
|
2018-11-01 09:44:29 +00:00
|
|
|
test-aat-layout \
|
2018-11-03 18:58:30 +00:00
|
|
|
test-baseline \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-blob \
|
|
|
|
test-buffer \
|
2018-09-26 20:29:35 +00:00
|
|
|
test-collect-unicodes \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-common \
|
2020-01-28 09:04:47 +00:00
|
|
|
test-draw \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-font \
|
2018-10-19 08:34:47 +00:00
|
|
|
test-map \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-object \
|
2018-11-04 00:50:56 +00:00
|
|
|
test-ot-face \
|
2019-11-20 18:15:41 +00:00
|
|
|
test-ot-glyphname \
|
2013-01-03 04:50:36 +00:00
|
|
|
test-set \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-shape \
|
2018-03-20 18:21:06 +00:00
|
|
|
test-subset \
|
2018-02-13 00:01:15 +00:00
|
|
|
test-subset-cmap \
|
2019-05-16 18:29:15 +00:00
|
|
|
test-subset-drop-tables \
|
2018-02-08 00:32:56 +00:00
|
|
|
test-subset-glyf \
|
2018-02-22 01:59:57 +00:00
|
|
|
test-subset-hdmx \
|
2018-02-14 22:16:25 +00:00
|
|
|
test-subset-hmtx \
|
2018-02-13 01:42:20 +00:00
|
|
|
test-subset-os2 \
|
2018-03-07 18:33:02 +00:00
|
|
|
test-subset-post \
|
2018-03-06 23:40:35 +00:00
|
|
|
test-subset-vmtx \
|
2018-09-24 23:50:47 +00:00
|
|
|
test-subset-cff1 \
|
|
|
|
test-subset-cff2 \
|
2019-03-19 07:41:41 +00:00
|
|
|
test-subset-gvar \
|
|
|
|
test-subset-hvar \
|
2019-03-22 01:09:37 +00:00
|
|
|
test-subset-vvar \
|
2020-01-15 18:11:40 +00:00
|
|
|
test-subset-sbix \
|
2020-01-19 00:35:52 +00:00
|
|
|
test-subset-gpos \
|
2020-01-24 13:52:23 +00:00
|
|
|
test-subset-colr \
|
2020-01-21 18:35:43 +00:00
|
|
|
test-subset-cbdt \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-unicode \
|
2019-08-14 14:12:51 +00:00
|
|
|
test-var-coords \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-version \
|
2019-04-10 23:38:35 +00:00
|
|
|
test-subset-nameids \
|
2012-01-19 19:52:02 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2018-02-06 00:40:31 +00:00
|
|
|
test_subset_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-02-13 00:01:15 +00:00
|
|
|
test_subset_cmap_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2019-05-16 18:29:15 +00:00
|
|
|
test_subset_drop_tables_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-02-08 00:32:56 +00:00
|
|
|
test_subset_glyf_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-02-22 01:59:57 +00:00
|
|
|
test_subset_hdmx_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-02-14 22:16:25 +00:00
|
|
|
test_subset_hmtx_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-03-26 21:26:45 +00:00
|
|
|
test_subset_os2_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-03-07 18:33:02 +00:00
|
|
|
test_subset_post_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-03-06 23:40:35 +00:00
|
|
|
test_subset_vmtx_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-09-24 23:50:47 +00:00
|
|
|
test_subset_cff1_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
|
|
|
test_subset_cff2_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2019-03-19 08:00:53 +00:00
|
|
|
test_subset_gvar_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
|
|
|
test_subset_hvar_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2019-03-22 01:09:37 +00:00
|
|
|
test_subset_vvar_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2020-01-15 18:11:40 +00:00
|
|
|
test_subset_sbix_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2020-01-21 18:35:43 +00:00
|
|
|
test_subset_cbdt_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2019-04-10 23:38:35 +00:00
|
|
|
test_subset_nameids_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2020-01-19 00:35:52 +00:00
|
|
|
test_subset_gpos_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2020-01-24 13:52:23 +00:00
|
|
|
test_subset_colr_LDADD = $(LDADD) $(top_builddir)/src/libharfbuzz-subset.la
|
2018-02-06 00:40:31 +00:00
|
|
|
|
2017-12-05 20:52:54 +00:00
|
|
|
test_unicode_CPPFLAGS = \
|
|
|
|
$(AM_CPPFLAGS) \
|
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
$(NULL)
|
2013-05-28 21:34:37 +00:00
|
|
|
test_unicode_LDADD = $(LDADD)
|
2012-11-01 23:26:01 +00:00
|
|
|
if HAVE_ICU
|
|
|
|
test_unicode_CPPFLAGS += $(ICU_CFLAGS)
|
2015-07-22 21:26:23 +00:00
|
|
|
test_unicode_LDADD += $(top_builddir)/src/libharfbuzz-icu.la $(ICU_LIBS)
|
2012-11-01 23:26:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2012-01-19 19:52:02 +00:00
|
|
|
TEST_PROGS += \
|
2016-04-25 16:20:57 +00:00
|
|
|
test-ot-color \
|
2018-11-05 09:01:58 +00:00
|
|
|
test-ot-ligature-carets \
|
2018-10-16 10:47:21 +00:00
|
|
|
test-ot-name \
|
2019-07-25 20:00:29 +00:00
|
|
|
test-ot-meta \
|
2018-11-20 19:56:46 +00:00
|
|
|
test-ot-metrics \
|
2012-01-19 19:52:02 +00:00
|
|
|
test-ot-tag \
|
2018-10-04 20:59:36 +00:00
|
|
|
test-ot-extents-cff \
|
2019-10-01 12:43:40 +00:00
|
|
|
test-ot-metrics-tt-var \
|
2012-01-19 19:52:02 +00:00
|
|
|
$(NULL)
|
2016-08-25 08:47:15 +00:00
|
|
|
|
2018-10-10 20:32:35 +00:00
|
|
|
|
2018-09-26 17:20:51 +00:00
|
|
|
if HAVE_PTHREAD
|
2018-09-26 20:02:45 +00:00
|
|
|
if HAVE_FREETYPE
|
2018-09-26 17:20:51 +00:00
|
|
|
TEST_PROGS += test-multithread
|
2018-09-26 20:02:45 +00:00
|
|
|
test_multithread_CFLAGS = $(CFLAGS) $(PTHREAD_CFLAGS) $(FREETYPE_CFLAGS)
|
|
|
|
test_multithread_LDADD = $(LDADD) $(PTHREAD_LIBS) $(FREETYPE_LIBS)
|
2018-09-28 15:06:49 +00:00
|
|
|
# The auto-generated link rule somehow includes CFLAGS as well. Without
|
|
|
|
# it, pthread link fails, because, who knows why, $PTHREAD_LIBS is empty.
|
|
|
|
test_multithread_LINK = $(LINK) $(PTHREAD_CFLAGS)
|
2018-09-26 20:02:45 +00:00
|
|
|
endif
|
2018-09-26 17:20:51 +00:00
|
|
|
endif
|
|
|
|
|
2016-08-25 08:47:15 +00:00
|
|
|
if HAVE_FREETYPE
|
|
|
|
TEST_PROGS += \
|
2016-09-26 20:12:48 +00:00
|
|
|
test-ot-math \
|
2016-08-25 08:47:15 +00:00
|
|
|
$(NULL)
|
2016-09-26 20:12:48 +00:00
|
|
|
test_ot_math_LDADD = $(LDADD) $(FREETYPE_LIBS)
|
|
|
|
test_ot_math_CPPFLAGS = $(AM_CPPFLAGS) $(FREETYPE_CFLAGS)
|
2016-08-25 08:47:15 +00:00
|
|
|
endif # HAVE_FREETYPE
|
|
|
|
|
2012-01-19 19:52:02 +00:00
|
|
|
|
|
|
|
# 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)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Default test running environment
|
|
|
|
TESTS = $(TEST_PROGS)
|
|
|
|
TESTS_ENVIRONMENT = \
|
|
|
|
MALLOC_CHECK_=2 \
|
|
|
|
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) \
|
|
|
|
G_DEBUG=gc-friendly \
|
|
|
|
G_SLICE=always-malloc \
|
|
|
|
srcdir=$(srcdir) \
|
2016-09-26 09:51:36 +00:00
|
|
|
G_TEST_SRCDIR=$(abs_srcdir) \
|
|
|
|
G_TEST_BUILDDIR=$(abs_builddir) \
|
2013-02-06 20:29:07 +00:00
|
|
|
$(NULL)
|
2012-01-19 19:52:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
# check-tool: Run tests under $(TOOL)
|
|
|
|
check-tool:
|
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
|
|
|
|
TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute \
|
|
|
|
env $(TOOL)'
|
|
|
|
# check-tool-raw: Run tests under $(TOOL), but don't run under libtool
|
|
|
|
check-tool-raw:
|
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
|
|
|
|
TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
|
|
|
|
env $(TOOL)'
|
|
|
|
|
|
|
|
# check-gtester: Run tests under gtester
|
|
|
|
GTESTER = gtester
|
|
|
|
check-gtester:
|
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool-raw TOOL="$(GTESTER) --verbose --keep-going"
|
|
|
|
|
|
|
|
|
|
|
|
# Check tests under valgrind. Saves log to log-valgrind.txt
|
|
|
|
VALGRIND_FLAGS = \
|
2018-11-06 16:07:47 +00:00
|
|
|
--tool=memcheck \
|
2012-01-19 19:52:02 +00:00
|
|
|
--track-origins=yes \
|
2018-11-06 16:10:56 +00:00
|
|
|
--leak-check=yes \
|
2012-01-19 19:52:02 +00:00
|
|
|
$(EXTRA_VALGRIND_FLAGS)
|
|
|
|
# Can't do for now: --show-reachable=yes
|
|
|
|
CLEANFILES += log-valgrind.txt
|
2013-03-07 01:21:11 +00:00
|
|
|
valgrind_verbose = $(valgrind_verbose_@AM_V@)
|
|
|
|
valgrind_verbose_ = $(valgrind_verbose_@AM_DEFAULT_V@)
|
2012-01-19 19:52:02 +00:00
|
|
|
valgrind_verbose_0 = | \
|
|
|
|
grep '\(^[^=]\|ERROR SUMMARY\|definitely lost\|indirectly lost\)' | grep -v ': 0'
|
|
|
|
# TODO: The following check does not fail if valgrind finds error. It should.
|
|
|
|
check-valgrind:
|
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool TOOL="valgrind $(VALGRIND_FLAGS)" \
|
|
|
|
2>&1 | tee log-valgrind.txt $(valgrind_verbose)
|
|
|
|
|
|
|
|
|
|
|
|
# check-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 $@
|
2018-10-29 09:41:01 +00:00
|
|
|
symbols-tested-or-deprecated.txt: symbols-tested.txt $(top_builddir)/src/harfbuzz-deprecated-symbols.txt
|
2018-10-19 06:44:25 +00:00
|
|
|
$(AM_V_GEN)cat $^ | sort | uniq > $@.tmp; mv $@.tmp $@
|
2012-01-19 19:52:02 +00:00
|
|
|
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 $@
|
2018-10-19 06:44:25 +00:00
|
|
|
symbols-untested.txt: symbols-tested-or-deprecated.txt symbols-exported.txt
|
2012-01-19 19:52:02 +00:00
|
|
|
$(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
|
2018-10-19 08:34:47 +00:00
|
|
|
CLEANFILES += symbols-tested.txt \
|
|
|
|
symbols-exported.txt \
|
|
|
|
symbols-untested.txt \
|
|
|
|
symbols-tested-or-deprecated.txt
|
2012-01-19 19:52:02 +00:00
|
|
|
check-symbols: symbols-untested.txt
|
|
|
|
@! cat $^ | grep .
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-05 20:52:54 +00:00
|
|
|
else # !HAVE_GLIB
|
2012-01-19 19:52:02 +00:00
|
|
|
check-am: err-glib
|
|
|
|
err-glib:
|
|
|
|
@echo "You need to have glib support enabled to run the tests"
|
|
|
|
@exit 77
|
2017-12-05 20:52:54 +00:00
|
|
|
endif # HAVE_GLIB
|
2012-01-19 19:52:02 +00:00
|
|
|
|
|
|
|
.PHONY: check-symbols check-tool check-valgrind
|
|
|
|
|
|
|
|
-include $(top_srcdir)/git.mk
|