add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh)
add_test(NAME check-defs.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-defs.sh)
- set_tests_properties(check-static-inits.sh check-libstdc++.sh check-symbols.sh check-defs.sh
- PROPERTIES ENVIRONMENT "libs=.;srcdir=${PROJECT_SOURCE_DIR}/src")
+ set_tests_properties(
+ check-static-inits.sh check-libstdc++.sh check-symbols.sh check-defs.sh
+ PROPERTIES
+ ENVIRONMENT "libs=.;srcdir=${PROJECT_SOURCE_DIR}/src"
+ SKIP_RETURN_CODE 77)
endif ()
add_test(NAME check-c-linkage-decls.sh COMMAND ./check-c-linkage-decls.sh)
add_test(NAME check-includes.sh COMMAND ./check-includes.sh)
set_tests_properties(
check-c-linkage-decls.sh check-header-guards.sh check-externs.sh check-includes.sh
- PROPERTIES WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src)
+ PROPERTIES
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src
+ SKIP_RETURN_CODE 77)
endif ()
# Needs to come last so that variables defined above are passed to
if OS_WIN32
export_symbols = -export-symbols harfbuzz.def
harfbuzz_def_dependency = harfbuzz.def
+export_symbols_icu = -export-symbols harfbuzz-icu.def
+harfbuzz_icu_def_dependency = harfbuzz-icu.def
+export_symbols_subset = -export-symbols harfbuzz-subset.def
+harfbuzz_subset_def_dependency = harfbuzz-subset.def
libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
else
if WITHSTDCPP
endif
endif
+base_link_flags = $(AM_LDFLAGS) -lm -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) $(HBNODISTHEADERS)
libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
-libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -lm -version-info $(HB_LIBTOOL_VERSION_INFO) $(export_symbols) -no-undefined
+libharfbuzz_la_LDFLAGS = $(base_link_flags) $(export_symbols)
libharfbuzz_la_LIBADD = $(HBLIBS)
EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
pkginclude_HEADERS = $(HBHEADERS)
libharfbuzz_subset_la_LINK = $(libharfbuzz_la_LINK)
libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources)
libharfbuzz_subset_la_CPPFLAGS = $(libharfbuzz_la_CPPFLAGS)
-libharfbuzz_subset_la_LDFLAGS = $(libharfbuzz_la_LDFLAGS)
+libharfbuzz_subset_la_LDFLAGS = $(base_link_flags) $(export_symbols_subset)
libharfbuzz_subset_la_LIBADD = libharfbuzz.la
+EXTRA_libharfbuzz_subset_la_DEPENDENCIES = $(harfbuzz_subset_def_dependency)
pkginclude_HEADERS += $(HB_SUBSET_headers)
pkgconfig_DATA += harfbuzz-subset.pc
EXTRA_DIST += harfbuzz-subset.pc.in
libharfbuzz_icu_la_LINK = $(libharfbuzz_la_LINK)
libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources)
libharfbuzz_icu_la_CPPFLAGS = $(libharfbuzz_la_CPPFLAGS) $(ICU_CFLAGS)
-libharfbuzz_icu_la_LDFLAGS = $(libharfbuzz_la_LDFLAGS)
+libharfbuzz_icu_la_LDFLAGS = $(base_link_flags) $(export_symbols_icu)
libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la
+EXTRA_libharfbuzz_icu_la_DEPENDENCIES = $(harfbuzz_icu_def_dependency)
pkginclude_HEADERS += $(HB_ICU_headers)
pkgconfig_DATA += harfbuzz-icu.pc
endif
CLEANFILES += $(pkgconfig_DATA)
-CLEANFILES += harfbuzz.def
+CLEANFILES += harfbuzz.def harfbuzz-icu.def harfbuzz-subset.def
harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS)
$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
+harfbuzz-icu.def: $(HB_ICU_headers)
+ $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
+harfbuzz-subset.def: $(HB_SUBSET_headers)
+ $(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
GENERATORS = \
test_buffer_serialize_CPPFLAGS = $(HBCFLAGS)
test_buffer_serialize_LDADD = libharfbuzz.la $(HBLIBS)
-check: harfbuzz.def # For check-defs.sh
+check: harfbuzz.def harfbuzz-icu.def harfbuzz-subset.def # For check-defs.sh
dist_check_SCRIPTS = \
check-c-linkage-decls.sh \
if h.endswith (".h"):
with io.open(h, encoding='utf8') as f: headers_content.append (f.read ())
-result = ("EXPORTS\n" +
- "\n".join (sorted (re.findall (r"^hb_\w+(?= \()", "\n".join (headers_content), re.M))) +
- "\nLIBRARY libharfbuzz-0.dll")
+result = """EXPORTS
+%s
+LIBRARY lib%s-0.dll""" % (
+ "\n".join (sorted (re.findall (r"^hb_\w+(?= \()", "\n".join (headers_content), re.M))),
+ sys.argv[1].replace ('.def', '')
+)
with open (sys.argv[1], "w") as f: f.write (result)