X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=Makefile.in;h=93318cfd608bcd026965f814d45a34c296b27a47;hp=f88fd5ad05a8c0fa309d91a9738d100b93b10771;hb=0597b51d28b5f095931c54a5e5f90ed9d5e18790;hpb=36d9ece323c89dbd553644c80fea449c5dd1e685 diff --git a/Makefile.in b/Makefile.in index f88fd5a..93318cf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,6 +8,7 @@ datarootdir = @datarootdir@ datadir = @datadir@ top_builddir = @top_builddir@ with_demo_app = @with_demo_app@ +with_coverage = @with_coverage@ CC=@CC@ CXX=@CXX@ @@ -20,7 +21,7 @@ RANLIB=ranlib INSTALL=install MKDIR=mkdir -ifeq ($(COVERAGE),1) +ifeq ($(with_coverage),yes) CXXFLAGS += -fprofile-arcs -ftest-coverage --coverage LDFLAGS += -fprofile-arcs -ftest-coverage LDLIBS += -lgcov @@ -102,7 +103,8 @@ libmovit.la: $(LIB_OBJS:.o=.lo) %.lo: %.cpp $(LIBTOOL) --mode=compile $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< - sed 's/\.o:/\.lo:/' < $(@:.lo=.d) > $(@:.lo=.ld) + [ ! -r $(@:.lo=.d) ] || sed 's/\.o:/\.lo:/' < $(@:.lo=.d) > $(@:.lo=.ld) + [ ! -r .libs/$(@:.lo=.d) ] || sed 's/\.o:/\.lo:/' < .libs/$(@:.lo=.d) > .libs/$(@:.lo=.ld) %.o: %.cpp $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< @@ -127,11 +129,16 @@ check: $(TESTS) exit 1; \ fi -# 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 +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)