summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-22 18:16:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:44:01 -0500
commita45cc42a687872c85b10eb5b7105ae84eba0ce76 (patch)
tree2bff609c1b476f5d0073409569dd2a80687413a6 /source4
parent91ee0709b2a41268bc5d148130e2d3d2a1813b6e (diff)
downloadsamba-a45cc42a687872c85b10eb5b7105ae84eba0ce76.tar.gz
samba-a45cc42a687872c85b10eb5b7105ae84eba0ce76.tar.bz2
samba-a45cc42a687872c85b10eb5b7105ae84eba0ce76.zip
r20954: Add lcov target, fix gcov.
(This used to be commit f7e93afa1c698ff005d3ce594b952ee2c8431d29)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/config.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index de71747a9d..651f09dc25 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