summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2017-10-14 15:40:54 +0000
committerPeter Eisentraut2017-10-14 15:44:45 +0000
commit5f340cb30ce2f0d9f272840b0d977b0a4b854f0b (patch)
tree10b1ad69ef3e2199b9cb939e839217ae0ac1f8b6
parentb81eba6a650186dc35b6a1fb8bde320d9c29055d (diff)
Reinstate genhtml --prefix option for non-vpath builds
In c3d9a66024a93e6d0380bdd1b18cb03a67216b72, the genhtml --prefix option was removed to get slightly better behavior for vpath builds. genhtml would then automatically pick a suitable prefix. However, for non-vpath builds, this makes the coverage output dependent on the length of the path where the source code happens to be, leading to confusingly arbitrary results. So put the --prefix option back for non-vpath builds.
-rw-r--r--src/Makefile.global.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index a4209df7c95..27ec54a417f 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -898,7 +898,7 @@ GENHTML_TITLE = PostgreSQL $(VERSION)
coverage-html-stamp: lcov_base.info lcov_test.info
rm -rf coverage
- $(GENHTML) $(GENHTML_FLAGS) -o coverage --title='$(GENHTML_TITLE)' --num-spaces=4 $^
+ $(GENHTML) $(GENHTML_FLAGS) -o coverage --title='$(GENHTML_TITLE)' --num-spaces=4 $(if $(filter no,$(vpath_build)),--prefix='$(abs_top_srcdir)') $^
touch $@
LCOV += --gcov-tool $(GCOV)