summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcaro <caro>2012-09-12 16:02:31 +0000
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2012-09-12 16:02:31 +0000
commit7ae28d3401a50b46c6331c29c92e5e5526d3dc2e (patch)
tree115415771df747e18825ae0bc55f1135c6b12c45
parent107ad90c6c8f7dd9d9330a2c8ffbd9109331bc07 (diff)
downloadeobj-7ae28d3401a50b46c6331c29c92e5e5526d3dc2e.tar.gz
eobj-7ae28d3401a50b46c6331c29c92e5e5526d3dc2e.tar.bz2
eobj-7ae28d3401a50b46c6331c29c92e5e5526d3dc2e.zip
Eo: examples rule
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@76538 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
-rw-r--r--Makefile.am20
-rw-r--r--configure.ac7
-rw-r--r--m4/efl_benchmark.m433
-rw-r--r--m4/efl_examples.m463
-rw-r--r--m4/efl_tests.m466
-rw-r--r--src/Makefile.am9
-rw-r--r--src/examples/Makefile.am5
-rw-r--r--src/examples/eo_isa/Makefile.am8
-rw-r--r--src/examples/evas/Makefile.am12
-rw-r--r--src/examples/simple/Makefile.am8
10 files changed, 37 insertions, 194 deletions
diff --git a/Makefile.am b/Makefile.am
index 1f21acb..2ac5c2b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,12 +35,9 @@ COPYING \
README \
autogen.sh \
eo.pc.in \
-m4/efl_benchmark.m4 \
-m4/efl_doxygen.m4 \
-m4/efl_examples.m4 \
-m4/efl_tests.m4
+m4/efl_doxygen.m4
-.PHONY: doc benchmark
+.PHONY: doc benchmark examples
# Documentation
@@ -74,10 +71,17 @@ if EFL_ENABLE_COVERAGE
@$(MAKE) lcov-report
endif
+# benchmark
+
benchmark:
- @cd src && $(MAKE) benchmark
- @mkdir result || true
- @cd result && ../src/benchmarks/eo_bench `date +%F_%s`
+ @$(MAKE) -C src benchmark
+ @mkdir benchmark || true
+ @cd benchmark && ../src/benchmarks/eo_bench `date +%F_%s`
+
+# examples
+
+examples:
+ @$(MAKE) -C src examples
clean-local:
@rm -rf coverage benchmark
diff --git a/configure.ac b/configure.ac
index 078e045..14afbb6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,14 +169,9 @@ AC_SUBST([lt_enable_auto_import])
### Make the debug preprocessor configurable
-### Unit tests, coverage and benchmarking
AC_SUBST([requirements_pc_eo])
-
-### Build and install examples
-EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
-
AC_CONFIG_FILES([
Makefile
eo.pc
@@ -218,8 +213,8 @@ echo
echo " Documentation........: ${build_doc}"
echo " Unit Tests...........:"
echo " unit testing.......: ${_efl_enable_tests}"
-echo " build..............: make check"
echo " coverage...........: ${_efl_enable_coverage}"
+echo " build..............: make check"
echo " Examples.............: make examples"
echo " Benchmark............: make benchmark"
echo
diff --git a/m4/efl_benchmark.m4 b/m4/efl_benchmark.m4
deleted file mode 100644
index 1d1e22e..0000000
--- a/m4/efl_benchmark.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
-dnl That code is public domain and can be freely used or copied.
-
-dnl Macro that check if benchmark support is wanted.
-
-dnl Usage: EFL_CHECK_BENCHMARK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Defines the automake conditionnal EFL_ENABLE_BENCHMARK
-
-AC_DEFUN([EFL_CHECK_BENCHMARK],
-[
-
-dnl configure option
-
-AC_ARG_ENABLE([benchmark],
- [AC_HELP_STRING([--enable-benchmark], [enable benchmarking @<:@default=disabled@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- _efl_enable_benchmark="yes"
- else
- _efl_enable_benchmark="no"
- fi
- ],
- [_efl_enable_benchmark="no"])
-
-AC_MSG_CHECKING([whether benchmark are built])
-AC_MSG_RESULT([${_efl_enable_benchmark}])
-
-AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes")
-
-AS_IF([test "x$_efl_enable_benchmark" = "xyes"], [$1], [$2])
-])
-
-dnl End of efl_benchmark.m4
diff --git a/m4/efl_examples.m4 b/m4/efl_examples.m4
deleted file mode 100644
index 2a809ad..0000000
--- a/m4/efl_examples.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
-dnl That code is public domain and can be freely used or copied.
-
-dnl Macro that check if building examples is wanted.
-
-dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES
-
-AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
-[
-
-dnl configure option
-
-AC_ARG_ENABLE([build-examples],
- [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- _efl_enable_build_examples="yes"
- else
- _efl_enable_build_examples="no"
- fi
- ],
- [_efl_enable_build_examples="no"])
-
-AC_MSG_CHECKING([whether examples are built])
-AC_MSG_RESULT([${_efl_enable_build_examples}])
-
-AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")
-
-AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
-])
-
-
-dnl Macro that check if installing examples is wanted.
-
-dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES
-
-AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
-[
-
-dnl configure option
-
-AC_ARG_ENABLE([install-examples],
- [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- _efl_enable_install_examples="yes"
- else
- _efl_enable_install_examples="no"
- fi
- ],
- [_efl_enable_install_examples="no"])
-
-AC_MSG_CHECKING([whether examples are installed])
-AC_MSG_RESULT([${_efl_enable_install_examples}])
-
-AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")
-
-AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
-])
-
-dnl End of efl_examples.m4
diff --git a/m4/efl_tests.m4 b/m4/efl_tests.m4
deleted file mode 100644
index 4f87559..0000000
--- a/m4/efl_tests.m4
+++ /dev/null
@@ -1,66 +0,0 @@
-dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
-dnl That code is public domain and can be freely used or copied.
-
-dnl Macro that check if tests programs are wanted and if yes, if
-dnl the Check library is available.
-dnl the lcov program is available.
-
-dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Define the automake conditionnal EFL_ENABLE_TESTS
-
-AC_DEFUN([EFL_CHECK_TESTS],
-[
-m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
-
-dnl configure option
-
-AC_ARG_ENABLE([tests],
- [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- _efl_enable_tests="yes"
- else
- _efl_enable_tests="no"
- fi
- ],
- [_efl_enable_tests="no"])
-
-AC_MSG_CHECKING([whether tests are built])
-AC_MSG_RESULT([${_efl_enable_tests}])
-
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-
-if test "x${_efl_enable_tests}" = "xyes" ; then
- PKG_CHECK_MODULES([CHECK],
- [check >= 0.9.5],
- [dummy="yes"],
- [_efl_enable_tests="no"])
-fi
-
-_efl_enable_coverage="no"
-if test "x${_efl_enable_tests}" = "xyes" ; then
- AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
- if test "x$have_lcov" = "xyes" ; then
- m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
- m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
-# remove any optimisation flag and force debug symbols
- if test "x${prefer_assert}" = "xno"; then
- m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
- else
- m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
- fi
- _efl_enable_coverage="yes"
- else
- AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
- fi
-fi
-
-AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
-AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
-
-AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
-
-m4_popdef([UPEFL])
-])
-
-dnl End of efl_tests.m4
diff --git a/src/Makefile.am b/src/Makefile.am
index c3b7c36..3c5fb3e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,12 @@ MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = lib benchmarks examples tests
-.PHONY: benchmark
+.PHONY: benchmark examples
benchmark:
- @cd benchmarks && $(MAKE) benchmark
+ @make -C lib
+ @$(MAKE) -C benchmarks benchmark
+
+examples:
+ @make -C lib
+ @$(MAKE) -C examples examples
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 1ca1fb4..cb051fa 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -2,3 +2,8 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = eo_isa evas simple
+
+examples:
+ @$(MAKE) -C eo_isa examples
+ @$(MAKE) -C evas examples
+ @$(MAKE) -C simple examples
diff --git a/src/examples/eo_isa/Makefile.am b/src/examples/eo_isa/Makefile.am
index eb95eba..05baecc 100644
--- a/src/examples/eo_isa/Makefile.am
+++ b/src/examples/eo_isa/Makefile.am
@@ -8,11 +8,9 @@ AM_CPPFLAGS = \
@EFL_EO_BUILD@ \
@EO_CFLAGS@
-noinst_PROGRAMS =
+EXTRA_PROGRAMS = eo_isa
-if EFL_BUILD_EXAMPLES
-
-noinst_PROGRAMS += eo_isa
+examples: eo_isa
eo_isa_SOURCES = \
complex.c \
@@ -26,5 +24,3 @@ simple.c \
simple.h
eo_isa_LDADD = $(top_builddir)/src/lib/libeo.la @EO_LIBS@
-
-endif
diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am
index e544298..1736d77 100644
--- a/src/examples/evas/Makefile.am
+++ b/src/examples/evas/Makefile.am
@@ -9,12 +9,13 @@ AM_CPPFLAGS = \
@EO_CFLAGS@ \
@ELM_CFLAGS@
-noinst_PROGRAMS =
+EXTRA_PROGRAMS =
-if EFL_BUILD_EXAMPLES
if EO_BUILD_EXAMPLE_EVAS
-noinst_PROGRAMS += evas
+EXTRA_PROGRAMS += evas
+
+examples: evas
evas_SOURCES = \
elw_box.c \
@@ -31,5 +32,8 @@ test.c
evas_LDADD = $(top_builddir)/src/lib/libeo.la @ELM_LIBS@ @EO_LIBS@
-endif
+else
+
+examples:
+
endif
diff --git a/src/examples/simple/Makefile.am b/src/examples/simple/Makefile.am
index fa21f0c..983ee55 100644
--- a/src/examples/simple/Makefile.am
+++ b/src/examples/simple/Makefile.am
@@ -8,11 +8,9 @@ AM_CPPFLAGS = \
@EFL_EO_BUILD@ \
@EO_CFLAGS@
-noinst_PROGRAMS =
+EXTRA_PROGRAMS = simple
-if EFL_BUILD_EXAMPLES
-
-noinst_PROGRAMS += simple
+examples: simple
simple_SOURCES = \
interface.c \
@@ -24,5 +22,3 @@ simple.c \
simple.h
simple_LDADD = $(top_builddir)/src/lib/libeo.la @EO_LIBS@
-
-endif