summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/eos-coverage.m443
1 files changed, 38 insertions, 5 deletions
diff --git a/m4/eos-coverage.m4 b/m4/eos-coverage.m4
index 6bd605f..766a2d8 100644
--- a/m4/eos-coverage.m4
+++ b/m4/eos-coverage.m4
@@ -1,12 +1,41 @@
-dnl Copyright 2014 Endless Mobile, Inc.
+dnl Copyright 2014-2015 Endless Mobile, Inc.
+dnl
+dnl Permission is hereby granted, free of charge, to any person obtaining a copy
+dnl of this software and associated documentation files (the "Software"), to
+dnl deal in the Software without restriction, including without limitation the
+dnl rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+dnl sell copies of the Software, and to permit persons to whom the Software is
+dnl furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice shall be included in
+dnl all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+dnl AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+dnl IN THE SOFTWARE.
+dnl
+dnl As a special exception, any Work generated by code contained in this
+dnl file is dedicated to the public domain and Endless Mobile, Inc, waives their
+dnl rights to the work worldwide under copyright law, to the extent allowed
+dnl by the law (the 'Waiver'). Endless Mobile, Inc makes the Wavier for the
+dnl benefit of each member public at large. The Waiver shall not be subject to
+dnl revocation, recession, cancellation, termination or any other legal or
+dnl equitable action to disrupt the quiet enjoyment of the work by the public.
+dnl Should any part of the Waiver be for any reason judged legally invalid or
+dnl ineffective under applicable law, then the Waiver shall be preserved to the
+dnl maximum extent permitted.
dnl
dnl Macros to check for code coverage support
dnl
dnl If you wish to use the JavaScript coverage function, Makefile-jasmine.am.inc
dnl should be included before calling EOS_COVERAGE_RULES.
dnl
-dnl Add clean-coverage to the clean-local target in your Makefile to get the clean
-dnl rules for the coverage data. Or, if clean-local is not defined in your
+dnl Add clean-coverage to the clean-local target in your Makefile to get the
+dnl clean rules for the coverage data. Or, if clean-local is not defined in your
dnl Makefile, you can just use EOS_COVERAGE_CLEAN_RULES.
dnl
dnl Variables that affect the operation of the inserted make rules:
@@ -150,7 +179,7 @@ AC_DEFUN_ONCE([EOS_COVERAGE_REPORT], [
# Now that we've figured out if we have coverage reports, build the rules
AS_IF([test "x$EOS_ENABLE_COVERAGE" = "xyes"], [
EOS_COVERAGE_RULES_HEADER='
-# Copyright (c) 2015 Endless Mobile, Inc, all rights reserved.
+# This file was generated by eos-coverage.m4
#
# Internal variable to track the coverage accumulated counter files.
_eos_coverage_outputs =
@@ -319,11 +348,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: