SUBDIRS = data src utils doc
-MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
- config.h.in config.sub configure install-sh \
- ltconfig ltmain.sh missing mkinstalldirs \
- stamp-h.in edje_docs.tar edje_docs.tar.gz edje.c \
- edje.spec depcomp compile edje.pc
+MAINTAINERCLEANFILES = \
+Makefile.in \
+aclocal.m4 \
+compile \
+config.guess \
+config.h.in \
+config.h.in~ \
+config.sub \
+configure \
+depcomp \
+install-sh \
+ltmain.sh \
+missing \
+$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
+$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
+$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
+m4/libtool.m4 \
+m4/lt~obsolete.m4 \
+m4/ltoptions.m4 \
+m4/ltsugar.m4 \
+m4/ltversion.m4
### this is all fine and great - but edje should not be going and installing
### data in another software's data dir - it's just wrong. not to mention this
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = edje.pc
-.PHONY: doc
+.PHONY: doc coverage
# Documentation
doc:
@echo "entering doc/"
make -C doc doc
+
+# Unit tests
+
+if EFL_ENABLE_TESTS
+
+check-local:
+ @./src/tests/edje_suite
+
+else
+
+check-local:
+ @echo "reconfigure with --enable-tests"
+
+endif
+
+# Coverage report
+
+if EFL_ENABLE_COVERAGE
+lcov-reset:
+ @rm -rf $(top_builddir)/coverage
+ @find $(top_builddir) -name "*.gcda" -delete
+ @lcov --zerocounters --directory $(top_builddir)
+
+lcov-report:
+ @mkdir $(top_builddir)/coverage
+ lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
+ lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
+ genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
+ @echo "Coverage Report at $(top_builddir)/coverage/html"
+
+coverage:
+ @$(MAKE) lcov-reset
+ @$(MAKE) check
+ @$(MAKE) lcov-report
+else
+lcov-reset:
+ @echo "reconfigure with --enable-coverage"
+
+lcov-report:
+ @echo "reconfigure with --enable-coverage"
+
+coverage:
+ @echo "reconfigure with --enable-tests --enable-coverage"
+endif