1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

r10041: Add 'gcov' make target. Run

'make clean gcov' to generate a set of files describing the test coverage
of the Samba 4 code.
(This used to be commit 72bb84add469ad4f027ddbd8d73bb846b0609fa2)
This commit is contained in:
Jelmer Vernooij 2005-09-05 19:54:35 +00:00 committed by Gerald (Jerry) Carter
parent 3ca370b3db
commit 46ca543e19
4 changed files with 18 additions and 2 deletions

View File

@ -127,3 +127,5 @@ fi
# allow for --with-hostcc=gcc
AC_ARG_WITH(hostcc,[ --with-hostcc=compiler choose host compiler],[HOSTCC=$withval],[HOSTCC=$CC])
AC_SUBST(HOSTCC)
AC_PATH_PROG(GCOV,gcov)

View File

@ -77,13 +77,14 @@ CC=$config{CC}
CFLAGS=-I\$(srcdir)/include -I\$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -I\$(srcdir)/lib $config{CFLAGS} $config{CPPFLAGS}
LD=$config{LD}
LD_FLAGS=$config{LDFLAGS} -Lbin
GCOV=$config{GCOV}
LD_FLAGS=$config{LDFLAGS}
STLD=$config{AR}
STLD_FLAGS=-rc
SHLD=$config{CC}
SHLD_FLAGS=$config{LDSHFLAGS} -Lbin
SHLD_FLAGS=$config{LDSHFLAGS}
XSLTPROC=$config{XSLTPROC}

View File

@ -78,6 +78,7 @@ showflags:
@echo " LD_FLAGS = $(LD_FLAGS)"
@echo " STLD_FLAGS = $(STLD_FLAGS)"
@echo " SHLD_FLAGS = $(SHLD_FLAGS)"
@echo " LIBS = $(LIBS)"
install: showlayout installbin installdat installswat installmisc

View File

@ -281,3 +281,15 @@ REQUIRED_SUBSYSTEMS = \
MANPAGE = torture/man/locktest.1
# End BINARY locktest
#################################
GCOV_FLAGS = -ftest-coverage -fprofile-arcs
GCOV_LIBS = -lgcov
gcov:
@$(MAKE) test \
CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
LD_FLAGS="$(LD_FLAGS) $(GCOV_FLAGS)" \
LIBS="$(LIBS) $(GCOV_LIBS)"
for I in $(sort $(dir $(_ALL_OBJS_OBJS))); \
do $(GCOV) -p -o $$I $$I/*.c; \
done