xref: /freebsd/contrib/openpam/Makefile.am (revision 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456)
17f106882SDag-Erling SmørgravACLOCAL_AMFLAGS = -I m4
2556dce83SDag-Erling Smørgrav
3f3b0ac34SDag-Erling SmørgravSUBDIRS = misc include lib bin modules
4ca236e63SDag-Erling Smørgrav
5fe980754SDag-Erling Smørgravif WITH_DOC
6fe980754SDag-Erling SmørgravSUBDIRS += doc
7fe980754SDag-Erling Smørgravendif
8fe980754SDag-Erling Smørgrav
92f3ed619SDag-Erling SmørgravSUBDIRS += t
102f3ed619SDag-Erling Smørgrav
11fe980754SDag-Erling SmørgravEXTRA_DIST = \
12fe980754SDag-Erling Smørgrav	CREDITS \
13fe980754SDag-Erling Smørgrav	HISTORY \
14fe980754SDag-Erling Smørgrav	INSTALL \
15fe980754SDag-Erling Smørgrav	LICENSE \
16fe980754SDag-Erling Smørgrav	README \
17fe980754SDag-Erling Smørgrav	RELNOTES \
18fe980754SDag-Erling Smørgrav	autogen.sh \
19fe980754SDag-Erling Smørgrav	misc/gendoc.pl
20*3ba4c8c8SDag-Erling Smørgrav
21*3ba4c8c8SDag-Erling Smørgravif WITH_CODE_COVERAGE
22*3ba4c8c8SDag-Erling Smørgravcovdir = @abs_top_builddir@/cov
23*3ba4c8c8SDag-Erling Smørgravcoverage: coverage-clean all coverage-prepare coverage-run coverage-report
24*3ba4c8c8SDag-Erling Smørgravcoverage-clean:
25*3ba4c8c8SDag-Erling Smørgrav	-rm -rf "${covdir}"
26*3ba4c8c8SDag-Erling Smørgravcoverage-prepare:
27*3ba4c8c8SDag-Erling Smørgrav	mkdir "${covdir}"
28*3ba4c8c8SDag-Erling Smørgravif CLANG_CODE_COVERAGE
29*3ba4c8c8SDag-Erling Smørgravprofdata = ${covdir}/@PACKAGE@.profdata
30*3ba4c8c8SDag-Erling Smørgrav# hardcoding libpam.so here is horrible, need to find a better solution
31*3ba4c8c8SDag-Erling Smørgravcoverage-run:
32*3ba4c8c8SDag-Erling Smørgrav	LLVM_PROFILE_FILE="${covdir}/@PACKAGE@.%p.raw" \
33*3ba4c8c8SDag-Erling Smørgrav	    ${MAKE} -C "@abs_top_builddir@" check
34*3ba4c8c8SDag-Erling Smørgravcoverage-report:
35*3ba4c8c8SDag-Erling Smørgrav	llvm-profdata@clang_ver@ merge \
36*3ba4c8c8SDag-Erling Smørgrav	    --sparse "${covdir}/@PACKAGE@".*.raw -o "${profdata}"
37*3ba4c8c8SDag-Erling Smørgrav	llvm-cov@clang_ver@ show \
38*3ba4c8c8SDag-Erling Smørgrav	    --format=html --tab-size=8 \
39*3ba4c8c8SDag-Erling Smørgrav	    --output-dir="${covdir}" \
40*3ba4c8c8SDag-Erling Smørgrav	    --instr-profile="${profdata}" \
41*3ba4c8c8SDag-Erling Smørgrav	    --object "@abs_top_builddir@/lib/libpam/.libs/libpam.so"
42*3ba4c8c8SDag-Erling Smørgrav	@echo "coverage report: file://${covdir}/index.html"
43*3ba4c8c8SDag-Erling Smørgravendif
44*3ba4c8c8SDag-Erling Smørgravelse
45*3ba4c8c8SDag-Erling Smørgravcoverage:
46*3ba4c8c8SDag-Erling Smørgrav	echo "code coverage is not enabled." >&2
47*3ba4c8c8SDag-Erling Smørgrav	false
48*3ba4c8c8SDag-Erling Smørgravendif
49