This makes a lot more sense, since it controls compilation options.
datadir = @datadir@
top_builddir = @top_builddir@
with_demo_app = @with_demo_app@
datadir = @datadir@
top_builddir = @top_builddir@
with_demo_app = @with_demo_app@
+with_coverage = @with_coverage@
INSTALL=install
MKDIR=mkdir
INSTALL=install
MKDIR=mkdir
+ifeq ($(with_coverage),yes)
CXXFLAGS += -fprofile-arcs -ftest-coverage --coverage
LDFLAGS += -fprofile-arcs -ftest-coverage
LDLIBS += -lgcov
CXXFLAGS += -fprofile-arcs -ftest-coverage --coverage
LDFLAGS += -fprofile-arcs -ftest-coverage
LDLIBS += -lgcov
-# You need to build with COVERAGE=1 to use this target.
+ifeq ($(with_coverage),yes)
coverage: check
lcov -d . -c -o movit.info
lcov --remove movit.info '*_test.cpp' 'test_util.*' 'sandbox_effect.*' widgets.cpp -o movit.info
genhtml -o coverage movit.info
coverage: check
lcov -d . -c -o movit.info
lcov --remove movit.info '*_test.cpp' 'test_util.*' 'sandbox_effect.*' widgets.cpp -o movit.info
genhtml -o coverage movit.info
+else
+coverage:
+ @echo You need to compile with --enable-coverage to use this target.
+ @exit 1
+endif
HDRS = effect_chain.h effect_util.h effect.h input.h image_format.h init.h util.h defs.h resource_pool.h
HDRS += $(INPUTS:=.h)
HDRS = effect_chain.h effect_util.h effect.h input.h image_format.h init.h util.h defs.h resource_pool.h
HDRS += $(INPUTS:=.h)
AC_SUBST([with_demo_app])
AC_SUBST([with_demo_app])
+with_coverage=no
+AC_ARG_ENABLE([coverage], [ --enable-coverage build with information needed to compute test coverage], [with_coverage=yes])
+AC_SUBST([with_coverage])
+
AC_CONFIG_FILES([Makefile movit.pc])
AC_OUTPUT
AC_CONFIG_FILES([Makefile movit.pc])
AC_OUTPUT