Skip to content

Commit

Permalink
[configure] 'fullcover_new' make target replaces 'cover'
Browse files Browse the repository at this point in the history
The 'fullcover_new' target reproduces the 'fullcover' target but uses
tools/dev/make_cover.pl to run the coverage tools (gcov, cover, etc.).  This
is much more flexible and easier to maintain than shell code within the
makefile.

Further, the old 'fullcover' target didn't make use of the predefined
variables set by 'perl Configure.pl', which make_cover.pl does.  Also, a
temporary directory is used by make_cover.pl for the coverage tools' output
which replaces the current behaviour of putting everything in the base build
directory.  Also, the old 'fullcover' target actually covered more files
than it was asked to and other files were repeatedly covered; this change
corrects this behaviour, however means that one has to be very explicit
about which directories need to be considered.
  • Loading branch information
paultcochrane committed Apr 20, 2013
1 parent 34280e9 commit ab3f702
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions config/gen/makefiles/root.in
Expand Up @@ -2965,15 +2965,7 @@ fullcover: \
cover-manifest \
cover-examples \
cover-distro
build_dir=$$PWD; \
for dir in $(FULLCOVER_DIRS); \
do \
cd $$dir; \
gcov *.c; \
cd $$build_dir; \
gcov2perl $$dir/*.gcov; \
done
cover -ignore_re '^\/usr\/local\/bin'
$(PERL) $(DEV_TOOLS_DIR)/make_cover.pl $(FULLCOVER_DIRS)

COVER_DIRS = \
src \
Expand Down Expand Up @@ -3008,22 +3000,6 @@ cover: \
cover-test_core
$(PERL) $(DEV_TOOLS_DIR)/make_cover.pl $(COVER_DIRS)

fullcover_new: \
cover.dummy \
cover-testb \
cover-testf \
cover-testr \
cover-src \
cover-run \
cover-perl \
cover-extra \
cover-codingstd \
cover-benchmark \
cover-manifest \
cover-examples \
cover-distro
$(PERL) $(DEV_TOOLS_DIR)/make_cover.pl $(FULLCOVER_DIRS)

cover.dummy: have-cover
$(PERL) Configure.pl --ccflags="$(CC_FLAGS) $(COVER_FLAGS)" \
--linkflags="$(COVER_FLAGS)" --ldflags="$(COVER_FLAGS)"
Expand Down

0 comments on commit ab3f702

Please sign in to comment.