]>
Commit | Line | Data |
---|---|---|
c75acc4c | 1 | SUBDIRS = src man conf init testing |
cf00cffe | 2 | |
157742be TB |
3 | if USE_FUZZING |
4 | SUBDIRS += fuzz | |
5 | endif | |
6 | ||
cf00cffe TB |
7 | if USE_SCRIPTS |
8 | SUBDIRS += scripts | |
9 | endif | |
10 | ||
d0f01a58 MW |
11 | if USE_SILENT_RULES |
12 | AM_MAKEFLAGS = -s | |
13 | endif | |
14 | ||
c0e56a66 | 15 | ACLOCAL_AMFLAGS = -I m4/config |
e455ae13 | 16 | |
3fa8d773 | 17 | EXTRA_DIST = Doxyfile.in LICENSE Android.common.mk.in Android.common.mk Android.mk |
dcb4651d | 18 | CLEANFILES = Doxyfile |
3fa8d773 TB |
19 | BUILT_SOURCES = Android.common.mk |
20 | MAINTAINERCLEANFILES = Android.common.mk | |
807c12ce | 21 | |
b188f231 | 22 | if USE_DEV_HEADERS |
7300eb29 MW |
23 | config_includedir = $(ipseclibdir)/include |
24 | nodist_config_include_HEADERS = config.h | |
b188f231 | 25 | endif |
7300eb29 | 26 | |
d8d756e3 TB |
27 | # we can't (and shouldn't) install/uninstall system files during make distcheck, |
28 | # so override the autodetected path for systemd units | |
29 | AM_DISTCHECK_CONFIGURE_FLAGS = \ | |
30 | --with-systemdsystemunitdir='$$(prefix)/lib/systemd/system' | |
31 | ||
127f65db | 32 | # we leave config files behind intentionally so prevent distcheck from complaining |
9691e537 | 33 | distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print |
127f65db | 34 | |
c577b5eb | 35 | Android.common.mk : Android.common.mk.in configure.ac |
0be946dc | 36 | $(AM_V_GEN) \ |
807c12ce TB |
37 | sed \ |
38 | -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \ | |
39 | $(srcdir)/$@.in > $@ | |
b1e69188 MW |
40 | |
41 | Doxyfile : Doxyfile.in | |
0be946dc | 42 | $(AM_V_GEN) \ |
b1e69188 MW |
43 | sed \ |
44 | -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \ | |
45 | -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \ | |
945fdeb9 | 46 | -e "s:\@SRC_DIR\@:$(srcdir):g" \ |
ea7e89c7 | 47 | $(srcdir)/$@.in > $@ |
b1e69188 MW |
48 | |
49 | apidoc : Doxyfile | |
882c993b | 50 | @test -d apidoc || doxygen |
1f3dbb1b | 51 | @! find Doxyfile $(top_srcdir)/src/ \( -name '*.h' -o -name '*.md' \) -newer apidoc | \ |
882c993b | 52 | grep -q '' || doxygen && touch apidoc |
dcb4651d | 53 | |
ab73ae67 | 54 | cov-reset-common: |
1f14b4a1 | 55 | @rm -rf $(top_builddir)/coverage |
6122bfd2 | 56 | @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcda" -delete |
ab73ae67 TB |
57 | |
58 | if COVERAGE | |
59 | cov-reset: cov-reset-common | |
1f14b4a1 TB |
60 | @lcov --zerocounters --directory $(top_builddir) |
61 | ||
62 | cov-report: | |
63 | @mkdir $(top_builddir)/coverage | |
906a4fd1 TB |
64 | lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir) \ |
65 | --rc lcov_branch_coverage=1 | |
3bc8a4a5 | 66 | lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' '*/suites/*' '/usr*' \ |
0d11d7b1 | 67 | -o $(abs_top_builddir)/coverage/coverage.cleaned.info \ |
906a4fd1 | 68 | --rc lcov_branch_coverage=1 |
b98551c7 | 69 | genhtml --num-spaces 4 --legend --branch-coverage --ignore-errors source \ |
1f14b4a1 TB |
70 | -t "$(PACKAGE_STRING)" \ |
71 | -o $(top_builddir)/coverage/html \ | |
72 | -p `readlink -m $(abs_top_srcdir)`/src \ | |
ab73ae67 | 73 | $(top_builddir)/coverage/coverage.cleaned.info |
1f14b4a1 TB |
74 | @echo "Coverage Report at $(top_builddir)/coverage/html" >&2 |
75 | ||
76 | coverage: | |
77 | @$(MAKE) cov-reset | |
78 | @$(MAKE) check | |
79 | @$(MAKE) cov-report | |
80 | else | |
1f14b4a1 TB |
81 | coverage: |
82 | @echo "reconfigure with --enable-coverage" | |
83 | endif | |
84 | ||
ab73ae67 | 85 | clean-local: cov-reset-common |
6122bfd2 | 86 | @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcno" -delete |
ab73ae67 TB |
87 | @rm -rf apidoc |
88 | ||
882c993b | 89 | .PHONY: cov-reset-common cov-reset cov-report coverage apidoc |