~ubuntu-branches/debian/squeeze/libnice/squeeze

« back to all changes in this revision

Viewing changes to scripts/lcov.mk

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-01-04 17:45:34 UTC
  • Revision ID: james.westby@ubuntu.com-20090104174534-dh5u1pfonumqa99c
Tags: upstream-0.0.4
ImportĀ upstreamĀ versionĀ 0.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# ccache breaks -fprofile-arcs
 
3
export CCACHE_DISABLE=1
 
4
 
 
5
OUT=lcov
 
6
 
 
7
lcov-clean:
 
8
        $(MAKE) clean
 
9
        find -name "*.gcno" -o -name "*.gcda" -exec rm '{}' ';'
 
10
        rm -rf $(OUT)
 
11
 
 
12
lcov-build:
 
13
        $(MAKE) CFLAGS="-O0 -fprofile-arcs -ftest-coverage" LDFLAGS="-lgcov" check
 
14
 
 
15
lcov-report:
 
16
        # hack: move gcov file from libraries back to source directory
 
17
        for dir in `find -name .libs`; do \
 
18
                (cd `dirname $$dir`; mv .libs/*.gc?? . || true) 2>/dev/null; \
 
19
        done
 
20
 
 
21
        mkdir -p $(OUT)
 
22
        lcov -d . -c >$(OUT)/lcov.info 2>/dev/null
 
23
        lcov -l $(OUT)/lcov.info 2>/dev/null |\
 
24
                egrep '(^/usr|/test.*\.c)' |\
 
25
                cut -d: -f1 >$(OUT)/lcov.remove
 
26
        lcov -r $(OUT)/lcov.info `cat $(OUT)/lcov.remove` 2>/dev/null >$(OUT)/lcov.info.clean
 
27
        genhtml -o lcov $(OUT)/lcov.info.clean
 
28