Use Botan 2.9.0 for tests
[strongswan.git] / Makefile.am
index 3a905f2..958edc6 100644 (file)
@@ -1,4 +1,8 @@
-SUBDIRS = src man init testing
+SUBDIRS = src man conf init testing
+
+if USE_FUZZING
+  SUBDIRS += fuzz
+endif
 
 if USE_SCRIPTS
   SUBDIRS += scripts
@@ -20,7 +24,15 @@ config_includedir = $(ipseclibdir)/include
 nodist_config_include_HEADERS = config.h
 endif
 
-Android.common.mk :    Android.common.mk.in configure.in
+# we can't (and shouldn't) install/uninstall system files during make distcheck,
+# so override the autodetected path for systemd units
+AM_DISTCHECK_CONFIGURE_FLAGS = \
+       --with-systemdsystemunitdir='$$(prefix)/lib/systemd/system'
+
+# we leave config files behind intentionally so prevent distcheck from complaining
+distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print
+
+Android.common.mk :    Android.common.mk.in configure.ac
                $(AM_V_GEN) \
                sed \
                -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
@@ -31,15 +43,17 @@ Doxyfile :  Doxyfile.in
                sed \
                -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
                -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
-               -e "s:\@SRC_DIR\@:$(srcdir):" \
+               -e "s:\@SRC_DIR\@:$(srcdir):g" \
                $(srcdir)/$@.in > $@
 
 apidoc :       Doxyfile
-               doxygen
+               @test -d apidoc || doxygen
+               @! find Doxyfile $(top_srcdir)/src/ \( -name '*.h' -o -name '*.md' \) -newer apidoc | \
+                       grep -q '' || doxygen && touch apidoc
 
 cov-reset-common:
                @rm -rf $(top_builddir)/coverage
-               @find $(top_builddir)/{src,scripts} -name "*.gcda" -delete
+               @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcda" -delete
 
 if COVERAGE
 cov-reset: cov-reset-common
@@ -47,10 +61,12 @@ cov-reset: cov-reset-common
 
 cov-report:
                @mkdir $(top_builddir)/coverage
-               lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir)
-               lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' \
-                        -o $(top_builddir)/coverage/coverage.cleaned.info
-               genhtml --num-spaces 4 --legend \
+               lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir) \
+                        --rc lcov_branch_coverage=1
+               lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' '*/suites/*' '/usr*' \
+                        -o $(abs_top_builddir)/coverage/coverage.cleaned.info \
+                        --rc lcov_branch_coverage=1
+               genhtml --num-spaces 4 --legend --branch-coverage --ignore-errors source \
                                -t "$(PACKAGE_STRING)" \
                                -o $(top_builddir)/coverage/html \
                                -p `readlink -m $(abs_top_srcdir)`/src \
@@ -67,7 +83,7 @@ coverage:
 endif
 
 clean-local: cov-reset-common
-               @find $(top_builddir)/{src,scripts} -name "*.gcno" -delete
+               @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcno" -delete
                @rm -rf apidoc
 
-.PHONY: cov-reset-common cov-reset cov-report coverage
\ No newline at end of file
+.PHONY: cov-reset-common cov-reset cov-report coverage apidoc