summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2015-01-15 12:05:13 +0800
committerSam Spilsbury <smspillaz@gmail.com>2015-01-23 10:50:30 +0800
commit05f4044c61b108e9f46521e5fbcfaccb7b603eab (patch)
treefbaeab5081abdfbc0049b882260a3d8c4f6706d1
parent03bb42cf2a878940e724089f348bb47907fd1861 (diff)
m4: Work around abs_top_srcdir-is-actually-relative bug in automake.
This was fixed in automake-1.13, but lcov does not like relative pathnames, so work around it by forcing the use of $(abspath). [endlessm/eos-shell#2264]
-rw-r--r--m4/eos-coverage.m46
1 files changed, 5 insertions, 1 deletions
diff --git a/m4/eos-coverage.m4 b/m4/eos-coverage.m4
index 5f2c27d..73f1cce 100644
--- a/m4/eos-coverage.m4
+++ b/m4/eos-coverage.m4
@@ -351,11 +351,15 @@ _eos_c_coverage_data_output_tmp_file := $(_eos_c_coverage_data_output_file).tmp
# Add final coverage output file to list of coverage data files
_eos_coverage_outputs += $(_eos_c_coverage_data_output_file)
+# With out of tree builds, abs_top_srcdir is actually the relative path
+# from the absolute top build dir to the top srcdir.
+_eos_normalized_top_srcdir = $(abspath $(abs_top_srcdir))
+
# Define an eos-c-coverage target to generate the coverage counters
eos-c-coverage:
mkdir -p $(_eos_c_coverage_trace_path)
$(LCOV) --compat-libtool --capture --directory $(abs_top_builddir) -o $(_eos_c_coverage_data_output_tmp_file)
- $(LCOV) --extract $(_eos_c_coverage_data_output_tmp_file) "$(abs_top_srcdir)/*" -o $(_eos_c_coverage_data_output_file)
+ $(LCOV) --extract $(_eos_c_coverage_data_output_tmp_file) "$(_eos_normalized_top_srcdir)/*" -o $(_eos_c_coverage_data_output_file)
rm -rf $(_eos_c_coverage_data_output_tmp_file)
eos-clean-c-coverage: