Fix lcov duplicate directory specification in non-VPATH builds.

In an in-tree build, "make coverage-html" invoked lcov with two
"-d ." options, because $(srcdir) is just ".".  With lcov 2.0
(and perhaps earlier versions?) that results in scanning every
foo.gcda file twice and producing counts twice what they should
be.  With later lcov versions (at least 2.3), it results in
"duplicate file" errors.

In VPATH builds we do need two -d options to cover both regular
and generated .c files.  But in in-tree builds it suffices to
specify "-d .", so suppress the second switch.

Author: Narek Galstyan <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: 
https://postgr.es/m/cahsn6_xcdqwe8_vvfhtfk27_xtdyvv+dr0ywzaoobz6+-vh...@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2a8e94f90c4e387486b02fdca47552b550d09766

Modified Files
--------------
src/Makefile.global.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Reply via email to