File: Makefile.am

package info (click to toggle)
libpsl 0.20.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 49,956 kB
  • sloc: ansic: 2,383; python: 518; makefile: 260; sh: 226
file content (67 lines) | stat: -rw-r--r-- 2,468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# got some hints from https://gitorious.org/openismus-playground/examplelib/source

SUBDIRS = po include src tools
if ENABLE_GTK_DOC
  SUBDIRS += docs/libpsl
else
if ENABLE_MAN
  SUBDIRS += docs/libpsl
endif
endif
SUBDIRS += fuzz tests msvc

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

# Enable GTK-Doc during make distcheck
#DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man

## 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

EXTRA_DIST = build-aux/config.rpath LICENSE
dist-hook:
	mkdir -p $(distdir)/list/tests
	cp -p $(PSL_FILE) $(distdir)/list
	cp -p $(PSL_TESTFILE) $(distdir)/list/tests

clean-local:
	rm -rf */*.gc?? */*/*.gc?? libpsl.info lcov

LCOV_INFO=libpsl.info
check-coverage: clean
	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
	$(MAKE)
	lcov --capture --initial --directory src --output-file $(LCOV_INFO)
	$(MAKE) check
	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'"

check-coverage-libidn:
	XLIB=libidn $(MAKE) check-coverage

check-coverage-libidn2:
	XLIB=libidn2 $(MAKE) check-coverage

check-coverage-libicu:
	XLIB=libicu $(MAKE) check-coverage

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'"