* eet: refactor some code.
[profile/ivi/eet.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 SUBDIRS = src doc
4
5 MAINTAINERCLEANFILES = \
6 Makefile.in \
7 aclocal.m4 \
8 compile \
9 config.guess \
10 config.h.in  \
11 config.sub  \
12 configure  \
13 depcomp \
14 install-sh \
15 ltmain.sh  \
16 missing  \
17 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
18 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
19 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
20 m4/libtool.m4 \
21 m4/lt~obsolete.m4 \
22 m4/ltoptions.m4 \
23 m4/ltsugar.m4 \
24 m4/ltversion.m4
25
26 EXTRA_DIST = \
27 AUTHORS \
28 COPYING \
29 COPYING-PLAIN \
30 autogen.sh \
31 eet.pc.in \
32 eet.spec.in \
33 eet.spec \
34 README.in \
35 README
36
37 pkgconfigdir = $(libdir)/pkgconfig
38 pkgconfig_DATA = eet.pc
39
40 .PHONY: doc coverage
41
42 # Documentation
43
44 doc:
45         @echo "entering doc/"
46         make -C doc doc
47
48 # Unit tests
49
50 if EFL_ENABLE_TESTS
51
52 check-local:
53         @./src/tests/eet_suite
54
55 else
56
57 check-local:
58         @echo "reconfigure with --enable-tests"
59
60 endif
61
62 # Coverage report
63
64 if EFL_ENABLE_COVERAGE
65 lcov-reset:
66         @rm -rf coverage
67         @find . -name "*.gcda" -exec rm {} \;
68         @lcov --directory . --zerocounters
69
70 lcov-report:
71         @mkdir coverage
72         @lcov --compat-libtool --directory . --capture --output-file coverage/coverage.info
73         @lcov -l coverage/coverage.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > coverage/remove
74         @lcov -r coverage/coverage.info `cat coverage/remove` > coverage/coverage.cleaned.info
75         @rm coverage/remove
76         @mv coverage/coverage.cleaned.info coverage/coverage.info
77         @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
78
79 coverage:
80         @make lcov-reset
81         @make check
82         @make lcov-report
83
84 clean-local:
85         @rm -rf coverage
86 else
87 lcov-reset:
88         @echo "reconfigure with --enable-coverage"
89
90 lcov-report:
91         @echo "reconfigure with --enable-coverage"
92
93 coverage:
94         @echo "reconfigure with --enable-tests --enable-coverage"
95 endif