]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/openpam/Makefile.am
sqlite3: Vendor import of sqlite3 3.46.0
[FreeBSD/FreeBSD.git] / contrib / openpam / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 SUBDIRS = misc include lib bin modules
4
5 if WITH_DOC
6 SUBDIRS += doc
7 endif
8
9 SUBDIRS += t
10
11 EXTRA_DIST = \
12         CREDITS \
13         HISTORY \
14         INSTALL \
15         LICENSE \
16         README \
17         RELNOTES \
18         autogen.sh \
19         misc/gendoc.pl
20
21 if WITH_CODE_COVERAGE
22 covdir = @abs_top_builddir@/cov
23 coverage: coverage-clean all coverage-prepare coverage-run coverage-report
24 coverage-clean:
25         -rm -rf "${covdir}"
26 coverage-prepare:
27         mkdir "${covdir}"
28 if CLANG_CODE_COVERAGE
29 profdata = ${covdir}/@PACKAGE@.profdata
30 # hardcoding libpam.so here is horrible, need to find a better solution
31 coverage-run:
32         LLVM_PROFILE_FILE="${covdir}/@PACKAGE@.%p.raw" \
33             ${MAKE} -C "@abs_top_builddir@" check
34 coverage-report:
35         llvm-profdata@clang_ver@ merge \
36             --sparse "${covdir}/@PACKAGE@".*.raw -o "${profdata}"
37         llvm-cov@clang_ver@ show \
38             --format=html --tab-size=8 \
39             --output-dir="${covdir}" \
40             --instr-profile="${profdata}" \
41             --object "@abs_top_builddir@/lib/libpam/.libs/libpam.so"
42         @echo "coverage report: file://${covdir}/index.html"
43 endif
44 else
45 coverage:
46         echo "code coverage is not enabled." >&2
47         false
48 endif