Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e4896d

Browse files
committed
Fix coverage targets so that HTML view is reliably updated when test data
changes. Add some documenting comments.
1 parent8f1658c commit0e4896d

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

‎src/Makefile.global.in

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.243 2008/09/05 12:11:18 petere Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.244 2008/10/03 15:35:17 petere Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -592,18 +592,30 @@ endif # enable_nls
592592
#
593593
# Coverage
594594

595+
# Explanation of involved files:
596+
# foo.csource file
597+
# foo.oobject file
598+
# foo.gcnogcov graph (a.k.a. "notes") file, created at compile time
599+
#(by gcc -ftest-coverage)
600+
# foo.gcdagcov data file, created when the program is run (for
601+
#programs compiled with gcc -fprofile-arcs)
602+
# foo.c.gcovgcov output file with coverage information, created by
603+
#gcov from foo.gcda (by "make coverage")
604+
# foo.c.gcov.out stdout captured when foo.c.gcov is created, mildly
605+
#interesting
606+
# lcov.infolcov tracefile, built from gcda files in one directory,
607+
#later collected by "make coverage-html"
608+
595609
ifeq ($(enable_coverage), yes)
596610

597611
# There is a strange interaction between lcov and existing .gcov
598612
# output files. Hence the rm command and the ordering dependency.
599613

600614
gcda_files :=$(wildcard*.gcda)
601615

602-
lcov.info:
616+
lcov.info:$(gcda_files)
603617
rm -f*.gcov
604-
ifneq (,$(gcda_files))
605-
$(LCOV) -d . -c -o $@ $(LCOVFLAGS)
606-
endif
618+
$(if$^,$(LCOV) -d . -c -o$@$(LCOVFLAGS))
607619

608620
%.c.gcov:%.gcda | lcov.info
609621
$(GCOV) -b -f -p -o.$(GCOVFLAGS)$*.c>$*.c.gcov.out

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp