Changeset View
Changeset View
Standalone View
Standalone View
Makefile.am
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | if test -d $(top_srcdir)/.git; then \ | ||||
rm -f $(distdir)/ChangeLog; \ | rm -f $(distdir)/ChangeLog; \ | ||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \ | mv $(distdir)/cl-t $(distdir)/ChangeLog; \ | ||||
fi | fi | ||||
stowinstall: | stowinstall: | ||||
$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libksba | $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libksba | ||||
# Coverage targets | |||||
werner: This looks like a lot of boilerplate code. It is okay to test this in libksba but when we… | |||||
Done Inline ActionsI'll try to integrate that into gcov.m4. The problem is that the boilerplate is project specific b/c it's excluding things like tests and utility functions from the coverage. kai: I'll try to integrate that into gcov.m4. The problem is that the boilerplate is project… | |||||
if HAVE_GCOV | |||||
.PHONY: clean-coverage | |||||
clean-coverage: | |||||
@echo Removing old coverage results | |||||
-find -name '*.gcda' -print | xargs -r rm | |||||
-find -name '*.gcno' -print | xargs -r rm | |||||
-rm -rf coverage.info coveragereport | |||||
.PHONY: coverage-html clean-coverage | |||||
coverage-html: check | |||||
@echo Collecting coverage data with lcov | |||||
$(top_srcdir)/autogen.sh --coverage $(LCOV) $(GCOV) $(abs_builddir) \ | |||||
tests src | |||||
$(top_srcdir)/autogen.sh --report $(LCOV) $(GENHTML) $(abs_builddir) \ | |||||
'*/tests/*' '*/asn1-parse.c' '*/asn1-parse.y' | |||||
clean-local: clean-coverage | |||||
endif # HAVE_GCOV |
This looks like a lot of boilerplate code. It is okay to test this in libksba but when we come to the point touse this with more packages I would suggest to do this as a shell script. Our ./autogen.sh is already the common denominator of all configure stuff. Adding a mode there to enable coverage reports and to use it as a helper script for Makefiles (iff needed) will make things much easier to maintain and keep consistend between packages. The generic autogen.sh source is in libgpg-error.