diff options
author | Simon Warta <[email protected]> | 2015-06-21 18:08:01 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-21 18:08:01 +0200 |
commit | db0e18e4dd040c7ecb9cb3b93c937c244c042b12 (patch) | |
tree | 6952fa0621e58994802aded0397929c19f049e13 | |
parent | 7dcf597fe0a7e513977e50758d649e86416f1a43 (diff) |
Fix coverage make target
-rwxr-xr-x | configure.py | 1 | ||||
-rw-r--r-- | src/build-data/makefile/gmake.in | 5 | ||||
-rw-r--r-- | src/build-data/makefile/gmake_coverage.in | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/configure.py b/configure.py index c7d650170..963a1d3d0 100755 --- a/configure.py +++ b/configure.py @@ -1242,6 +1242,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'out_dir': options.with_build_dir or os.path.curdir, 'build_dir': build_config.build_dir, + 'src_dir': options.src_dir, 'scripts_dir': os.path.join(build_config.src_dir, 'scripts'), diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in index ac3b8fae1..dd2fa418d 100644 --- a/src/build-data/makefile/gmake.in +++ b/src/build-data/makefile/gmake.in @@ -44,6 +44,9 @@ $(STATIC_LIB): $(LIBOBJS) $(AR) $(STATIC_LIB) $(LIBOBJS) $(RANLIB) $(STATIC_LIB) +# Fake targets +.PHONY = clean distclean docs website install valgrind lcov + %{gmake_coverage_in} SPHINX_CONFIG = %{sphinx_config_dir} @@ -52,8 +55,6 @@ SPHINX_OPTS = -b html WEBSITE_DIR=%{doc_output_dir}/website WEBSITE_SRC_DIR=%{doc_output_dir}/website-src -.PHONY = clean distclean docs website install valgrind - clean: -$(RM) %{libobj_dir}/* -$(RM) %{testobj_dir}/* diff --git a/src/build-data/makefile/gmake_coverage.in b/src/build-data/makefile/gmake_coverage.in index 1ce9927a4..2656069e3 100644 --- a/src/build-data/makefile/gmake_coverage.in +++ b/src/build-data/makefile/gmake_coverage.in @@ -1,3 +1,6 @@ -lcov: - lcov --directory build/obj/lib/ --directory src/lib --no-external --capture --output-file botan.info - genhtml botan.info -o coverage/ +%{out_dir}/coverage/index.html: $(TEST) + LD_LIBRARY_PATH=%{out_dir} $(TEST) + lcov --directory "%{build_dir}/obj/lib" --base-directory "%{src_dir}" --no-external --capture --output-file "%{out_dir}/coverage.info" + genhtml "%{out_dir}/coverage.info" -o "%{out_dir}/coverage" + +lcov: %{out_dir}/coverage/index.html |