summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2014-08-27 22:30:08 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-08-27 22:31:20 +0200
commitb50813f6e5025a84d0bb6d7b9e7d0cdfb0bf71f9 (patch)
tree04ecdd6564930c24385c8622e2671f50ab072338
parent18895e24895abab6466b21ea2e555690930cc72d (diff)
autotools: provide BSD-echo compatibility (fix c++ bindings)
Summary: The '-e' option does not exist in BSD-echo, nevertheless it behaves by default like the "echo -e" of the GNU-echo. Reviewers: raster, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1376 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--configure.ac10
-rw-r--r--m4/efl.m415
-rw-r--r--src/Makefile_Ecore_Audio_Cxx.am6
-rw-r--r--src/Makefile_Ecore_Cxx.am6
-rw-r--r--src/Makefile_Edje_Cxx.am6
-rw-r--r--src/Makefile_Efl_Cxx.am6
-rw-r--r--src/Makefile_Evas_Cxx.am6
7 files changed, 29 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index efbefc2306..9573bd8732 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,6 +271,16 @@ fi
271 271
272AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"]) 272AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
273 273
274### echo compatibility
275
276## the BSD echo does not have the -e option (it is the default behaviour)
277echo_e=
278if test "`echo -e x`" = "x"; then
279 echo_e=-e
280fi
281AC_SUBST([ECHO_E], [${echo_e}])
282
283
274### compilers 284### compilers
275 285
276AC_PROG_MKDIR_P 286AC_PROG_MKDIR_P
diff --git a/m4/efl.m4 b/m4/efl.m4
index f4ec1263d7..aa6de2afab 100644
--- a/m4/efl.m4
+++ b/m4/efl.m4
@@ -58,17 +58,10 @@ case "$TERM" in
58esac 58esac
59 59
60if test "${want_color}" = "yes"; then 60if test "${want_color}" = "yes"; then
61 if test `echo -e x` = x; then 61 COLOR_YES=`echo $echo_e "\033@<:@1;32m"`
62 echoopt=-e 62 COLOR_NO=`echo $echo_e "\033@<:@1;31m"`
63 else 63 COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"`
64 echoopt= 64 COLOR_RESET=`echo $echo_e "\033@<:@0m"`
65 fi
66
67 COLOR_YES=`echo $echoopt "\033@<:@1;32m"`
68 COLOR_NO=`echo $echoopt "\033@<:@1;31m"`
69 COLOR_OTHER=`echo $echoopt "\033@<:@1;36m"`
70 COLOR_RESET=`echo $echoopt "\033@<:@0m"`
71
72else 65else
73 COLOR_YES="" 66 COLOR_YES=""
74 COLOR_NO="" 67 COLOR_NO=""
diff --git a/src/Makefile_Ecore_Audio_Cxx.am b/src/Makefile_Ecore_Audio_Cxx.am
index 30552ba9a4..498bcbf887 100644
--- a/src/Makefile_Ecore_Audio_Cxx.am
+++ b/src/Makefile_Ecore_Audio_Cxx.am
@@ -13,10 +13,10 @@ lib/ecore_audio/ecore_audio_out_pulse.eo.hh \
13lib/ecore_audio/ecore_audio_in_tone.eo.hh 13lib/ecore_audio/ecore_audio_in_tone.eo.hh
14 14
15lib/ecore_audio/Ecore_Audio.hh: $(generated_ecore_audio_cxx_bindings) 15lib/ecore_audio/Ecore_Audio.hh: $(generated_ecore_audio_cxx_bindings)
16 @echo -e "#ifndef EFL_CXX_ECORE_AUDIO_HH\n#define EFL_CXX_ECORE_AUDIO_HH\n" > $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh 16 @echo @ECHO_E@ "#ifndef EFL_CXX_ECORE_AUDIO_HH\n#define EFL_CXX_ECORE_AUDIO_HH\n" > $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
17 @echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh 17 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
18 @for i in $(generated_ecore_audio_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh; done 18 @for i in $(generated_ecore_audio_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh; done
19 @echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh 19 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
20 20
21generated_ecore_audio_cxx_all = \ 21generated_ecore_audio_cxx_all = \
22 $(generated_ecore_audio_cxx_bindings) \ 22 $(generated_ecore_audio_cxx_bindings) \
diff --git a/src/Makefile_Ecore_Cxx.am b/src/Makefile_Ecore_Cxx.am
index 3db71dbbb7..d81651a6b1 100644
--- a/src/Makefile_Ecore_Cxx.am
+++ b/src/Makefile_Ecore_Cxx.am
@@ -15,10 +15,10 @@ lib/ecore/ecore_animator.eo.hh \
15lib/ecore/ecore_parent.eo.hh 15lib/ecore/ecore_parent.eo.hh
16 16
17lib/ecore/Ecore.eo.hh: $(generated_ecore_cxx_bindings) 17lib/ecore/Ecore.eo.hh: $(generated_ecore_cxx_bindings)
18 @echo -e "#ifndef EFL_CXX_ECORE_HH\n#define EFL_CXX_ECORE_HH\n" > $(top_builddir)/src/lib/ecore/Ecore.eo.hh 18 @echo @ECHO_E@ "#ifndef EFL_CXX_ECORE_HH\n#define EFL_CXX_ECORE_HH\n" > $(top_builddir)/src/lib/ecore/Ecore.eo.hh
19 @echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh 19 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
20 @for i in $(generated_ecore_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh; done 20 @for i in $(generated_ecore_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh; done
21 @echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh 21 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
22 22
23generated_ecore_cxx_all = \ 23generated_ecore_cxx_all = \
24 $(generated_ecore_cxx_bindings) \ 24 $(generated_ecore_cxx_bindings) \
diff --git a/src/Makefile_Edje_Cxx.am b/src/Makefile_Edje_Cxx.am
index b3f662504d..8d6b068e98 100644
--- a/src/Makefile_Edje_Cxx.am
+++ b/src/Makefile_Edje_Cxx.am
@@ -8,10 +8,10 @@ lib/edje/edje_object.eo.hh \
8lib/edje/edje_edit.eo.hh 8lib/edje/edje_edit.eo.hh
9 9
10lib/edje/Edje.hh: $(generated_edje_cxx_bindings) 10lib/edje/Edje.hh: $(generated_edje_cxx_bindings)
11 @echo -e "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/edje/Edje.hh 11 @echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/edje/Edje.hh
12 @echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/edje/Edje.hh 12 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/edje/Edje.hh
13 @for i in $(generated_edje_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/edje/Edje.hh; done 13 @for i in $(generated_edje_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/edje/Edje.hh; done
14 @echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh 14 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh
15 15
16generated_edje_cxx_all = \ 16generated_edje_cxx_all = \
17 $(generated_edje_cxx_bindings) \ 17 $(generated_edje_cxx_bindings) \
diff --git a/src/Makefile_Efl_Cxx.am b/src/Makefile_Efl_Cxx.am
index f752bdad27..1ddd25dc49 100644
--- a/src/Makefile_Efl_Cxx.am
+++ b/src/Makefile_Efl_Cxx.am
@@ -11,10 +11,10 @@ generated_efl_cxx_bindings = \
11 lib/efl/interfaces/efl_text_properties.eo.hh 11 lib/efl/interfaces/efl_text_properties.eo.hh
12 12
13lib/efl/Efl.hh: $(generated_efl_cxx_bindings) 13lib/efl/Efl.hh: $(generated_efl_cxx_bindings)
14 @echo -e "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh 14 @echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
15 @echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/efl/Efl.hh 15 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/efl/Efl.hh
16 @for i in $(generated_efl_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/efl/Efl.hh; done 16 @for i in $(generated_efl_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/efl/Efl.hh; done
17 @echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh 17 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh
18 18
19generated_efl_cxx_all = \ 19generated_efl_cxx_all = \
20 $(generated_efl_cxx_bindings) \ 20 $(generated_efl_cxx_bindings) \
diff --git a/src/Makefile_Evas_Cxx.am b/src/Makefile_Evas_Cxx.am
index 45155c1c0e..957ae73964 100644
--- a/src/Makefile_Evas_Cxx.am
+++ b/src/Makefile_Evas_Cxx.am
@@ -28,10 +28,10 @@ lib/evas/canvas/evas_zoomable_interface.eo.hh \
28lib/evas/canvas/evas_box.eo.hh 28lib/evas/canvas/evas_box.eo.hh
29 29
30lib/evas/Evas.hh: $(generated_evas_canvas_cxx_bindings) 30lib/evas/Evas.hh: $(generated_evas_canvas_cxx_bindings)
31 @echo -e "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh 31 @echo @ECHO_E@ "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh
32 @echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh 32 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh
33 @for i in $(generated_evas_canvas_cxx_bindings); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done 33 @for i in $(generated_evas_canvas_cxx_bindings); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done
34 @echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh 34 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh
35 35
36CLEANFILES += \ 36CLEANFILES += \
37$(generated_evas_canvas_cxx_bindings) \ 37$(generated_evas_canvas_cxx_bindings) \