From a45cc42a687872c85b10eb5b7105ae84eba0ce76 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 22 Jan 2007 18:16:01 +0000 Subject: [PATCH] r20954: Add lcov target, fix gcov. (This used to be commit f7e93afa1c698ff005d3ce594b952ee2c8431d29) --- source4/torture/config.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source4/torture/config.mk b/source4/torture/config.mk index de71747a9d9..651f09dc25b 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -338,9 +338,18 @@ GCOV_LIBS = -lgcov gcov: @$(MAKE) test \ + HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \ CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \ - LD_FLAGS="$(LD_FLAGS) $(GCOV_FLAGS)" \ - LIBS="$(LIBS) $(GCOV_LIBS)" + LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" for I in $(sort $(dir $(ALL_OBJS))); \ do $(GCOV) -p -o $$I $$I/*.c; \ done + +lcov: + @$(MAKE) test \ + HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \ + CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \ + LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" + rm **/{lex,parse}.{gcda,gcno} + lcov --base-directory `pwd` --directory . --capture --output-file samba.info + genhtml -o coverage samba.info