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>
This commit is contained in:
Jean Guyomarc'h 2014-08-27 22:30:08 +02:00 committed by Cedric BAIL
parent 18895e2489
commit b50813f6e5
7 changed files with 29 additions and 26 deletions

View File

@ -271,6 +271,16 @@ fi
AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
### echo compatibility
## the BSD echo does not have the -e option (it is the default behaviour)
echo_e=
if test "`echo -e x`" = "x"; then
echo_e=-e
fi
AC_SUBST([ECHO_E], [${echo_e}])
### compilers
AC_PROG_MKDIR_P

View File

@ -58,17 +58,10 @@ case "$TERM" in
esac
if test "${want_color}" = "yes"; then
if test `echo -e x` = x; then
echoopt=-e
else
echoopt=
fi
COLOR_YES=`echo $echoopt "\033@<:@1;32m"`
COLOR_NO=`echo $echoopt "\033@<:@1;31m"`
COLOR_OTHER=`echo $echoopt "\033@<:@1;36m"`
COLOR_RESET=`echo $echoopt "\033@<:@0m"`
COLOR_YES=`echo $echo_e "\033@<:@1;32m"`
COLOR_NO=`echo $echo_e "\033@<:@1;31m"`
COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"`
COLOR_RESET=`echo $echo_e "\033@<:@0m"`
else
COLOR_YES=""
COLOR_NO=""

View File

@ -13,10 +13,10 @@ lib/ecore_audio/ecore_audio_out_pulse.eo.hh \
lib/ecore_audio/ecore_audio_in_tone.eo.hh
lib/ecore_audio/Ecore_Audio.hh: $(generated_ecore_audio_cxx_bindings)
@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
@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
@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
@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
@for i in $(generated_ecore_audio_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh; done
@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
generated_ecore_audio_cxx_all = \
$(generated_ecore_audio_cxx_bindings) \

View File

@ -15,10 +15,10 @@ lib/ecore/ecore_animator.eo.hh \
lib/ecore/ecore_parent.eo.hh
lib/ecore/Ecore.eo.hh: $(generated_ecore_cxx_bindings)
@echo -e "#ifndef EFL_CXX_ECORE_HH\n#define EFL_CXX_ECORE_HH\n" > $(top_builddir)/src/lib/ecore/Ecore.eo.hh
@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
@echo @ECHO_E@ "#ifndef EFL_CXX_ECORE_HH\n#define EFL_CXX_ECORE_HH\n" > $(top_builddir)/src/lib/ecore/Ecore.eo.hh
@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
@for i in $(generated_ecore_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh; done
@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
generated_ecore_cxx_all = \
$(generated_ecore_cxx_bindings) \

View File

@ -8,10 +8,10 @@ lib/edje/edje_object.eo.hh \
lib/edje/edje_edit.eo.hh
lib/edje/Edje.hh: $(generated_edje_cxx_bindings)
@echo -e "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/edje/Edje.hh
@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/edje/Edje.hh
@echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/edje/Edje.hh
@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/edje/Edje.hh
@for i in $(generated_edje_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/edje/Edje.hh; done
@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh
@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh
generated_edje_cxx_all = \
$(generated_edje_cxx_bindings) \

View File

@ -11,10 +11,10 @@ generated_efl_cxx_bindings = \
lib/efl/interfaces/efl_text_properties.eo.hh
lib/efl/Efl.hh: $(generated_efl_cxx_bindings)
@echo -e "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/efl/Efl.hh
@echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/efl/Efl.hh
@for i in $(generated_efl_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/efl/Efl.hh; done
@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh
@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh
generated_efl_cxx_all = \
$(generated_efl_cxx_bindings) \

View File

@ -28,10 +28,10 @@ lib/evas/canvas/evas_zoomable_interface.eo.hh \
lib/evas/canvas/evas_box.eo.hh
lib/evas/Evas.hh: $(generated_evas_canvas_cxx_bindings)
@echo -e "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh
@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh
@echo @ECHO_E@ "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh
@echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh
@for i in $(generated_evas_canvas_cxx_bindings); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done
@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh
@echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh
CLEANFILES += \
$(generated_evas_canvas_cxx_bindings) \