libpsl/Makefile.am

60 lines
2.3 KiB
Makefile
Raw Normal View History

2014-03-20 17:17:24 +01:00
# got some hints from https://gitorious.org/openismus-playground/examplelib/source
2017-06-09 16:27:37 +02:00
SUBDIRS = po include src tools $(LIBPSL_DOCS) fuzz tests
2014-03-20 22:43:04 +01:00
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
2014-03-20 17:17:24 +01:00
# Enable GTK-Doc during make distcheck
#DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man
2014-03-20 17:17:24 +01:00
## Install the generated pkg-config file (.pc) into the expected location for
## architecture-dependent package configuration information. Occasionally,
## pkg-config files are also used for architecture-independent data packages,
## in which case the correct install location would be $(datadir)/pkgconfig.
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpsl.pc
2014-03-20 22:43:04 +01:00
EXTRA_DIST = config.rpath LICENSE
dist-hook:
mkdir -p $(distdir)/list/tests
cp -p $(PSL_FILE) $(distdir)/list
cp -p $(PSL_TESTFILE) $(distdir)/list/tests
2016-09-23 17:13:32 +02:00
clean-local:
2016-09-26 15:15:34 +02:00
rm -rf */*.gc?? */*/*.gc?? libpsl.info lcov
2016-09-23 17:13:32 +02:00
2017-06-09 16:27:37 +02:00
LCOV_INFO=libpsl.info
check-coverage: clean
2016-09-26 15:15:34 +02:00
if test -z "$(XLIB)"; then \
CFLAGS=$$CFLAGS" --coverage -O0" LDFLAGS=$$LDFLAGS" --coverage" ./configure --disable-runtime --disable-builtin; \
else \
CFLAGS=$$CFLAGS" --coverage -O0" LDFLAGS=$$LDFLAGS" --coverage" ./configure --enable-runtime=$(XLIB) --enable-builtin=$(XLIB); \
fi
2017-06-09 16:27:37 +02:00
$(MAKE)
lcov --capture --initial --directory src --output-file $(LCOV_INFO)
2016-09-26 15:15:34 +02:00
$(MAKE) check
2017-06-09 16:27:37 +02:00
lcov --capture --directory src --output-file $(LCOV_INFO)
genhtml --prefix . $(LCOV_INFO) --legend --title "libpsl" --output-directory=lcov
@echo
@echo "You can now view the coverage report with 'xdg-open lcov/index.html'"
2016-09-26 15:15:34 +02:00
check-coverage-libidn:
XLIB=libidn $(MAKE) check-coverage
check-coverage-libidn2:
XLIB=libidn2 $(MAKE) check-coverage
check-coverage-libicu:
XLIB=libicu $(MAKE) check-coverage
2017-06-09 16:27:37 +02:00
fuzz-coverage: clean
$(MAKE) -C src CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage"
$(MAKE) -C fuzz fuzz-coverage CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage"
lcov --capture --initial --directory src --directory fuzz --output-file $(LCOV_INFO)
lcov --capture --directory src --directory fuzz --output-file $(LCOV_INFO)
# lcov --remove $(LCOV_INFO) '*/test_linking.c' '*/css_tokenizer.lex' '*/<stdout>' -o $(LCOV_INFO)
genhtml --prefix . --ignore-errors source $(LCOV_INFO) --legend --title "libpsl-fuzz" --output-directory=lcov
@echo
@echo "You can now view the coverage report with 'xdg-open lcov/index.html'"