summaryrefslogtreecommitdiff
path: root/legacy/eobj
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-12 16:02:31 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-12 16:02:31 +0000
commit0e0b265470d5816c761f099049cb8eacd9da732b (patch)
treebb8a1fb54387d46b4a440cecd9ea14bc997b0790 /legacy/eobj
parent86e07547f1394d2c0fd7d4d47d8d29ed27d8b3da (diff)
Eo: examples rule
SVN revision: 76538
Diffstat (limited to 'legacy/eobj')
-rw-r--r--legacy/eobj/Makefile.am20
-rw-r--r--legacy/eobj/configure.ac7
-rw-r--r--legacy/eobj/m4/efl_benchmark.m433
-rw-r--r--legacy/eobj/m4/efl_examples.m463
-rw-r--r--legacy/eobj/m4/efl_tests.m466
-rw-r--r--legacy/eobj/src/Makefile.am9
-rw-r--r--legacy/eobj/src/examples/Makefile.am5
-rw-r--r--legacy/eobj/src/examples/eo_isa/Makefile.am8
-rw-r--r--legacy/eobj/src/examples/evas/Makefile.am12
-rw-r--r--legacy/eobj/src/examples/simple/Makefile.am8
10 files changed, 37 insertions, 194 deletions
diff --git a/legacy/eobj/Makefile.am b/legacy/eobj/Makefile.am
index 1f21acb064..2ac5c2b2f8 100644
--- a/legacy/eobj/Makefile.am
+++ b/legacy/eobj/Makefile.am
@@ -35,12 +35,9 @@ COPYING \
35README \ 35README \
36autogen.sh \ 36autogen.sh \
37eo.pc.in \ 37eo.pc.in \
38m4/efl_benchmark.m4 \ 38m4/efl_doxygen.m4
39m4/efl_doxygen.m4 \
40m4/efl_examples.m4 \
41m4/efl_tests.m4
42 39
43.PHONY: doc benchmark 40.PHONY: doc benchmark examples
44 41
45# Documentation 42# Documentation
46 43
@@ -74,10 +71,17 @@ if EFL_ENABLE_COVERAGE
74 @$(MAKE) lcov-report 71 @$(MAKE) lcov-report
75endif 72endif
76 73
74# benchmark
75
77benchmark: 76benchmark:
78 @cd src && $(MAKE) benchmark 77 @$(MAKE) -C src benchmark
79 @mkdir result || true 78 @mkdir benchmark || true
80 @cd result && ../src/benchmarks/eo_bench `date +%F_%s` 79 @cd benchmark && ../src/benchmarks/eo_bench `date +%F_%s`
80
81# examples
82
83examples:
84 @$(MAKE) -C src examples
81 85
82clean-local: 86clean-local:
83 @rm -rf coverage benchmark 87 @rm -rf coverage benchmark
diff --git a/legacy/eobj/configure.ac b/legacy/eobj/configure.ac
index 078e04564e..14afbb6479 100644
--- a/legacy/eobj/configure.ac
+++ b/legacy/eobj/configure.ac
@@ -169,14 +169,9 @@ AC_SUBST([lt_enable_auto_import])
169 169
170### Make the debug preprocessor configurable 170### Make the debug preprocessor configurable
171 171
172### Unit tests, coverage and benchmarking
173 172
174AC_SUBST([requirements_pc_eo]) 173AC_SUBST([requirements_pc_eo])
175 174
176
177### Build and install examples
178EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
179
180AC_CONFIG_FILES([ 175AC_CONFIG_FILES([
181Makefile 176Makefile
182eo.pc 177eo.pc
@@ -218,8 +213,8 @@ echo
218echo " Documentation........: ${build_doc}" 213echo " Documentation........: ${build_doc}"
219echo " Unit Tests...........:" 214echo " Unit Tests...........:"
220echo " unit testing.......: ${_efl_enable_tests}" 215echo " unit testing.......: ${_efl_enable_tests}"
221echo " build..............: make check"
222echo " coverage...........: ${_efl_enable_coverage}" 216echo " coverage...........: ${_efl_enable_coverage}"
217echo " build..............: make check"
223echo " Examples.............: make examples" 218echo " Examples.............: make examples"
224echo " Benchmark............: make benchmark" 219echo " Benchmark............: make benchmark"
225echo 220echo
diff --git a/legacy/eobj/m4/efl_benchmark.m4 b/legacy/eobj/m4/efl_benchmark.m4
deleted file mode 100644
index 1d1e22ec32..0000000000
--- a/legacy/eobj/m4/efl_benchmark.m4
+++ /dev/null
@@ -1,33 +0,0 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if benchmark support is wanted.
5
6dnl Usage: EFL_CHECK_BENCHMARK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Defines the automake conditionnal EFL_ENABLE_BENCHMARK
8
9AC_DEFUN([EFL_CHECK_BENCHMARK],
10[
11
12dnl configure option
13
14AC_ARG_ENABLE([benchmark],
15 [AC_HELP_STRING([--enable-benchmark], [enable benchmarking @<:@default=disabled@:>@])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_benchmark="yes"
19 else
20 _efl_enable_benchmark="no"
21 fi
22 ],
23 [_efl_enable_benchmark="no"])
24
25AC_MSG_CHECKING([whether benchmark are built])
26AC_MSG_RESULT([${_efl_enable_benchmark}])
27
28AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes")
29
30AS_IF([test "x$_efl_enable_benchmark" = "xyes"], [$1], [$2])
31])
32
33dnl End of efl_benchmark.m4
diff --git a/legacy/eobj/m4/efl_examples.m4 b/legacy/eobj/m4/efl_examples.m4
deleted file mode 100644
index 2a809adff5..0000000000
--- a/legacy/eobj/m4/efl_examples.m4
+++ /dev/null
@@ -1,63 +0,0 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if building examples is wanted.
5
6dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES
8
9AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
10[
11
12dnl configure option
13
14AC_ARG_ENABLE([build-examples],
15 [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_build_examples="yes"
19 else
20 _efl_enable_build_examples="no"
21 fi
22 ],
23 [_efl_enable_build_examples="no"])
24
25AC_MSG_CHECKING([whether examples are built])
26AC_MSG_RESULT([${_efl_enable_build_examples}])
27
28AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")
29
30AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
31])
32
33
34dnl Macro that check if installing examples is wanted.
35
36dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
37dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES
38
39AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
40[
41
42dnl configure option
43
44AC_ARG_ENABLE([install-examples],
45 [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
46 [
47 if test "x${enableval}" = "xyes" ; then
48 _efl_enable_install_examples="yes"
49 else
50 _efl_enable_install_examples="no"
51 fi
52 ],
53 [_efl_enable_install_examples="no"])
54
55AC_MSG_CHECKING([whether examples are installed])
56AC_MSG_RESULT([${_efl_enable_install_examples}])
57
58AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")
59
60AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
61])
62
63dnl End of efl_examples.m4
diff --git a/legacy/eobj/m4/efl_tests.m4 b/legacy/eobj/m4/efl_tests.m4
deleted file mode 100644
index 4f87559982..0000000000
--- a/legacy/eobj/m4/efl_tests.m4
+++ /dev/null
@@ -1,66 +0,0 @@
1dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available.
6dnl the lcov program is available.
7
8dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
9dnl Define the automake conditionnal EFL_ENABLE_TESTS
10
11AC_DEFUN([EFL_CHECK_TESTS],
12[
13m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
14
15dnl configure option
16
17AC_ARG_ENABLE([tests],
18 [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])],
19 [
20 if test "x${enableval}" = "xyes" ; then
21 _efl_enable_tests="yes"
22 else
23 _efl_enable_tests="no"
24 fi
25 ],
26 [_efl_enable_tests="no"])
27
28AC_MSG_CHECKING([whether tests are built])
29AC_MSG_RESULT([${_efl_enable_tests}])
30
31AC_REQUIRE([PKG_PROG_PKG_CONFIG])
32
33if test "x${_efl_enable_tests}" = "xyes" ; then
34 PKG_CHECK_MODULES([CHECK],
35 [check >= 0.9.5],
36 [dummy="yes"],
37 [_efl_enable_tests="no"])
38fi
39
40_efl_enable_coverage="no"
41if test "x${_efl_enable_tests}" = "xyes" ; then
42 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
43 if test "x$have_lcov" = "xyes" ; then
44 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
45 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
46# remove any optimisation flag and force debug symbols
47 if test "x${prefer_assert}" = "xno"; then
48 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
49 else
50 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
51 fi
52 _efl_enable_coverage="yes"
53 else
54 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
55 fi
56fi
57
58AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
59AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
60
61AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
62
63m4_popdef([UPEFL])
64])
65
66dnl End of efl_tests.m4
diff --git a/legacy/eobj/src/Makefile.am b/legacy/eobj/src/Makefile.am
index c3b7c36aa0..3c5fb3eb7d 100644
--- a/legacy/eobj/src/Makefile.am
+++ b/legacy/eobj/src/Makefile.am
@@ -3,7 +3,12 @@ MAINTAINERCLEANFILES = Makefile.in
3 3
4SUBDIRS = lib benchmarks examples tests 4SUBDIRS = lib benchmarks examples tests
5 5
6.PHONY: benchmark 6.PHONY: benchmark examples
7 7
8benchmark: 8benchmark:
9 @cd benchmarks && $(MAKE) benchmark 9 @make -C lib
10 @$(MAKE) -C benchmarks benchmark
11
12examples:
13 @make -C lib
14 @$(MAKE) -C examples examples
diff --git a/legacy/eobj/src/examples/Makefile.am b/legacy/eobj/src/examples/Makefile.am
index 1ca1fb4505..cb051fa380 100644
--- a/legacy/eobj/src/examples/Makefile.am
+++ b/legacy/eobj/src/examples/Makefile.am
@@ -2,3 +2,8 @@
2MAINTAINERCLEANFILES = Makefile.in 2MAINTAINERCLEANFILES = Makefile.in
3 3
4SUBDIRS = eo_isa evas simple 4SUBDIRS = eo_isa evas simple
5
6examples:
7 @$(MAKE) -C eo_isa examples
8 @$(MAKE) -C evas examples
9 @$(MAKE) -C simple examples
diff --git a/legacy/eobj/src/examples/eo_isa/Makefile.am b/legacy/eobj/src/examples/eo_isa/Makefile.am
index eb95eba3c1..05baeccdc4 100644
--- a/legacy/eobj/src/examples/eo_isa/Makefile.am
+++ b/legacy/eobj/src/examples/eo_isa/Makefile.am
@@ -8,11 +8,9 @@ AM_CPPFLAGS = \
8@EFL_EO_BUILD@ \ 8@EFL_EO_BUILD@ \
9@EO_CFLAGS@ 9@EO_CFLAGS@
10 10
11noinst_PROGRAMS = 11EXTRA_PROGRAMS = eo_isa
12 12
13if EFL_BUILD_EXAMPLES 13examples: eo_isa
14
15noinst_PROGRAMS += eo_isa
16 14
17eo_isa_SOURCES = \ 15eo_isa_SOURCES = \
18complex.c \ 16complex.c \
@@ -26,5 +24,3 @@ simple.c \
26simple.h 24simple.h
27 25
28eo_isa_LDADD = $(top_builddir)/src/lib/libeo.la @EO_LIBS@ 26eo_isa_LDADD = $(top_builddir)/src/lib/libeo.la @EO_LIBS@
29
30endif
diff --git a/legacy/eobj/src/examples/evas/Makefile.am b/legacy/eobj/src/examples/evas/Makefile.am
index e54429889f..1736d77cbe 100644
--- a/legacy/eobj/src/examples/evas/Makefile.am
+++ b/legacy/eobj/src/examples/evas/Makefile.am
@@ -9,12 +9,13 @@ AM_CPPFLAGS = \
9@EO_CFLAGS@ \ 9@EO_CFLAGS@ \
10@ELM_CFLAGS@ 10@ELM_CFLAGS@
11 11
12noinst_PROGRAMS = 12EXTRA_PROGRAMS =
13 13
14if EFL_BUILD_EXAMPLES
15if EO_BUILD_EXAMPLE_EVAS 14if EO_BUILD_EXAMPLE_EVAS
16 15
17noinst_PROGRAMS += evas 16EXTRA_PROGRAMS += evas
17
18examples: evas
18 19
19evas_SOURCES = \ 20evas_SOURCES = \
20elw_box.c \ 21elw_box.c \
@@ -31,5 +32,8 @@ test.c
31 32
32evas_LDADD = $(top_builddir)/src/lib/libeo.la @ELM_LIBS@ @EO_LIBS@ 33evas_LDADD = $(top_builddir)/src/lib/libeo.la @ELM_LIBS@ @EO_LIBS@
33 34
34endif 35else
36
37examples:
38
35endif 39endif
diff --git a/legacy/eobj/src/examples/simple/Makefile.am b/legacy/eobj/src/examples/simple/Makefile.am
index fa21f0c198..983ee55f17 100644
--- a/legacy/eobj/src/examples/simple/Makefile.am
+++ b/legacy/eobj/src/examples/simple/Makefile.am
@@ -8,11 +8,9 @@ AM_CPPFLAGS = \
8@EFL_EO_BUILD@ \ 8@EFL_EO_BUILD@ \
9@EO_CFLAGS@ 9@EO_CFLAGS@
10 10
11noinst_PROGRAMS = 11EXTRA_PROGRAMS = simple
12 12
13if EFL_BUILD_EXAMPLES 13examples: simple
14
15noinst_PROGRAMS += simple
16 14
17simple_SOURCES = \ 15simple_SOURCES = \
18interface.c \ 16interface.c \
@@ -24,5 +22,3 @@ simple.c \
24simple.h 22simple.h
25 23
26simple_LDADD = $(top_builddir)/src/lib/libeo.la @EO_LIBS@ 24simple_LDADD = $(top_builddir)/src/lib/libeo.la @EO_LIBS@
27
28endif