Eina examples: add missing files in distributed tarball, formatting
[framework/uifw/eina.git] / Makefile.am
index df7c06b..e11c796 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I m4/common -I m4/eina
 
 SUBDIRS = src doc
 
@@ -38,21 +38,84 @@ autogen.sh \
 eina.pc.in \
 eina.spec \
 eina.spec.in \
-m4/ac_attribute.m4 \
-m4/efl_benchmark.m4 \
-m4/efl_compiler_flag.m4 \
-m4/efl_cpu.m4 \
-m4/efl_doxygen.m4 \
-m4/efl_fnmatch.m4 \
-m4/efl_threads.m4 \
-m4/eina_bench.m4 \
-m4/eina_check.m4 \
-m4/efl_path_max.m4
-
-.PHONY: doc
+m4/common/efl_attribute.m4 \
+m4/common/efl_benchmark.m4 \
+m4/common/efl_compiler_flag.m4 \
+m4/common/efl_coverage.m4 \
+m4/common/efl_cpu.m4 \
+m4/common/efl_doxygen.m4 \
+m4/common/efl_fnmatch.m4 \
+m4/common/efl_shm_open.m4 \
+m4/common/efl_tests.m4 \
+m4/common/efl_threads.m4 \
+m4/common/efl_path_max.m4 \
+m4/eina/eina_bench.m4 \
+m4/eina/eina_check.m4
+
+.PHONY: doc coverage benchmark
 
 # Documentation
 
 doc:
        @echo "entering doc/"
-       @cd doc && make doc
+       @cd doc && $(MAKE) doc
+
+# Unit tests
+
+if EFL_ENABLE_TESTS
+
+check-local:
+       @./src/tests/eina_suite
+
+else
+
+check-local:
+       @echo "reconfigure with --enable-tests"
+
+endif
+
+# Coverage report
+
+if EFL_ENABLE_COVERAGE
+lcov-reset:
+       @rm -rf $(top_builddir)/coverage
+       @find $(top_builddir) -name "*.gcda" -delete
+       @lcov --zerocounters --directory $(top_builddir)
+
+lcov-report:
+       @mkdir $(top_builddir)/coverage
+       lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
+       lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
+       genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
+       @echo "Coverage Report at $(top_builddir)/coverage/html"
+
+coverage:
+       @$(MAKE) lcov-reset
+       @$(MAKE) check
+       @$(MAKE) lcov-report
+else
+lcov-reset:
+       @echo "reconfigure with --enable-coverage"
+
+lcov-report:
+       @echo "reconfigure with --enable-coverage"
+
+coverage:
+       @echo "reconfigure with --enable-tests --enable-coverage"
+endif
+
+if EFL_ENABLE_BENCHMARK
+
+benchmark:
+       @cd src && $(MAKE) benchmark
+       @mkdir result || true
+       @cd result && ../src/tests/eina_bench `date +%F_%s`
+
+else
+
+benchmark:
+       @echo "reconfigure with --enable-benchmark"
+endif
+
+clean-local:
+       @rm -rf coverage benchmark