--- a/src/Makefile Sat Dec 28 17:32:36 2024 +0100 +++ b/src/Makefile Sun Dec 29 15:24:20 2024 +0100 @@ -29,23 +29,19 @@ OBJ_EXT=.o OBJ=$(SRC:%.c=$(build_dir)/%$(OBJ_EXT)) -GCOV=$(SRC:%.c=%.c.gcov) static: $(build_dir)/libucx_static$(STLIB_EXT) shared: $(build_dir)/libucx$(SHLIB_EXT) -check-coverage: $(GCOV) - mv *.gcov "$(build_dir)" +check-coverage: $(SRC:%.c=$(build_dir)/%.gcda) + gcovr --html-details $(build_dir)/coverage.html \ + --object-directory $(build_dir) \ + --root $(root_dir)/src \ + --exclude-directories $(build_dir)/tests \ + $(build_dir) -%.c.gcov: %.c $(build_dir)/%.gcno - @tabs 22 - @gcov -Ho "$(build_dir)" $< | grep -A1 'File' | grep -v '\--' \ - | sed 's/File / /' | sed 's/Lines executed:/\t/' | tr -d '\n'"'" \ - | sed -E 's/(of [0-9]+)/\1\n/g' - @tabs -8 - -$(build_dir)/%.gcno: +$(build_dir)/%.gcda: test -f "$@" $(build_dir)/libucx_static$(STLIB_EXT): $(OBJ) @@ -60,7 +56,7 @@ $(RMFILE) $(libdir)/libucx$(SHLIB_EXT) $(COPYFILE) $(build_dir)/libucx_static$(STLIB_EXT) $(libdir)/libucx_static$(STLIB_EXT) $(COPYFILE) $(build_dir)/libucx$(SHLIB_EXT) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION) - $(COPYALL) $(src_dir)/src/cx $(includedir) + $(COPYALL) $(root_dir)/src/cx $(includedir) $(SYMLINK) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION_MAJOR) $(SYMLINK) $(libdir)/libucx$(SHLIB_EXT).$(LIBVERSION_MAJOR) $(libdir)/libucx$(SHLIB_EXT)