1# got some hints from https://gitorious.org/openismus-playground/examplelib/source 2 3SUBDIRS = po include src tools 4if ENABLE_GTK_DOC 5 SUBDIRS += docs/libpsl 6else 7if ENABLE_MAN 8 SUBDIRS += docs/libpsl 9endif 10endif 11SUBDIRS += fuzz tests msvc 12 13ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} 14 15# Enable GTK-Doc during make distcheck 16#DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man 17 18## Install the generated pkg-config file (.pc) into the expected location for 19## architecture-dependent package configuration information. Occasionally, 20## pkg-config files are also used for architecture-independent data packages, 21## in which case the correct install location would be $(datadir)/pkgconfig. 22pkgconfigdir = $(libdir)/pkgconfig 23pkgconfig_DATA = libpsl.pc 24 25EXTRA_DIST = build-aux/config.rpath LICENSE meson.build meson_options.txt 26dist-hook: 27 mkdir -p $(distdir)/list/tests 28 cp -p $(PSL_FILE) $(distdir)/list 29 cp -p $(PSL_TESTFILE) $(distdir)/list/tests 30 31clean-local: 32 rm -rf */*.gc?? */*/*.gc?? libpsl.info lcov 33 34LCOV_INFO=libpsl.info 35check-coverage: clean 36 if test -z "$(XLIB)"; then \ 37 CFLAGS=$$CFLAGS" --coverage -O0" LDFLAGS=$$LDFLAGS" --coverage" ./configure --disable-runtime --disable-builtin; \ 38 else \ 39 CFLAGS=$$CFLAGS" --coverage -O0" LDFLAGS=$$LDFLAGS" --coverage" ./configure --enable-runtime=$(XLIB) --enable-builtin=$(XLIB); \ 40 fi 41 $(MAKE) 42 lcov --capture --initial --directory src --output-file $(LCOV_INFO) 43 $(MAKE) check 44 lcov --capture --directory src --output-file $(LCOV_INFO) 45 genhtml --prefix . $(LCOV_INFO) --legend --title "libpsl" --output-directory=lcov 46 @echo 47 @echo "You can now view the coverage report with 'xdg-open lcov/index.html'" 48 49check-coverage-libidn: 50 XLIB=libidn $(MAKE) check-coverage 51 52check-coverage-libidn2: 53 XLIB=libidn2 $(MAKE) check-coverage 54 55check-coverage-libicu: 56 XLIB=libicu $(MAKE) check-coverage 57 58fuzz-coverage: clean 59 $(MAKE) -C src CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" 60 $(MAKE) -C fuzz fuzz-coverage CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" 61 lcov --capture --initial --directory src --directory fuzz --output-file $(LCOV_INFO) 62 lcov --capture --directory src --directory fuzz --output-file $(LCOV_INFO) 63# lcov --remove $(LCOV_INFO) '*/test_linking.c' '*/css_tokenizer.lex' '*/<stdout>' -o $(LCOV_INFO) 64 genhtml --prefix . --ignore-errors source $(LCOV_INFO) --legend --title "libpsl-fuzz" --output-directory=lcov 65 @echo 66 @echo "You can now view the coverage report with 'xdg-open lcov/index.html'" 67 68