aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile_Cxx.am
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:25:02 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:47:04 -0200
commita1f2db255b22052050baf0c04bb72146b22a6e99 (patch)
tree8499c057a7a0054f75fe3ab4719b2cc3659949d5 /src/Makefile_Cxx.am
parenteolian-cxx: Added cyclic compilation test (diff)
downloadefl-a1f2db255b22052050baf0c04bb72146b22a6e99.tar.gz
cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order of includes and creating forward declarations.
Diffstat (limited to 'src/Makefile_Cxx.am')
-rw-r--r--src/Makefile_Cxx.am115
1 files changed, 48 insertions, 67 deletions
diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am
index febc123dff..72d5713d46 100644
--- a/src/Makefile_Cxx.am
+++ b/src/Makefile_Cxx.am
@@ -21,63 +21,46 @@ bindings/cxx/eo_cxx/eo_private.hh
### Elementary C++
installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
nodist_installed_elementarycxxmainheaders_DATA = $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) \
-lib/elementary/Elementary.hh
-
-lib/elementary/Elementary.hh: $(elementary_eolian_cxx_hh)
- @echo @ECHO_E@ "#ifndef EFL_CXX_ELEMENTARY_HH\n#define EFL_CXX_ELEMENTARY_HH\n" > $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#if defined(ELEMENTARY_H) || defined(ELM_WIDGET_H)" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#error Do not include Elm C API headers before including Elementary.hh" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#endif" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#ifndef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#define EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#ifndef EFL_EO_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#define EFL_EO_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#ifndef ELM_INTERNAL_API_ARGESFSDFEFC" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#define ELM_INTERNAL_API_ARGESFSDFEFC" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "extern \"C\" {" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#include \"Elementary.h\"" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "#include \"elm_widget.h\"" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "}" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @echo @ECHO_E@ "" >> $(top_builddir)/src/lib/elementary/Elementary.hh
- @for i in $(elementary_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/elementary/Elementary.hh; done
- @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
-
-CLEANFILES += $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) lib/elementary/Elementary.hh
+lib/elementary/Elementary.eo.hh
+dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Elementary.hh
+
+lib/elementary/Elementary.eo.hh: $(elm_public_eolian_files) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
+
+CLEANFILES += $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) lib/elementary/Elementary.eo.hh
### Efl C++
installed_eflcxxmainheadersdir = $(includedir)/efl-cxx-@VMAJ@/
-nodist_installed_eflcxxmainheaders_DATA = $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.hh
+nodist_installed_eflcxxmainheaders_DATA = $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.eo.hh
+dist_installed_eflcxxmainheaders_DATA = lib/efl/Efl.hh
-lib/efl/Efl.hh: $(efl_eolian_cxx_hh)
- @echo @ECHO_E@ "#ifndef EFL_CXX_HH\n#define EFL_CXX_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 $(efl_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/efl/Efl.hh; done
- @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh
+lib/efl/Efl.eo.hh: $(efl_eolian_files) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
CLEANFILES += $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.hh
### Evas C++
installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
-nodist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
+dist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
+nodist_installed_evascxxmainheaders_DATA = lib/evas/Evas.eo.hh
installed_evascxxcanvasheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas
nodist_installed_evascxxcanvasheaders_DATA = $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh)
-lib/evas/Evas.hh: $(evas_eolian_cxx_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 $(evas_eolian_cxx_hh); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done
- @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh
+lib/evas/Evas.eo.hh: $(evas_eolian_pub_files) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
-CLEANFILES += $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh) lib/evas/Evas.hh
+CLEANFILES += $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh) lib/evas/Evas.eo.hh
### Eldbus C++
installed_eldbuscxxmainheadersdir = $(includedir)/eldbus_cxx-@VMAJ@
-nodist_installed_eldbuscxxmainheaders_DATA = $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.hh
+nodist_installed_eldbuscxxmainheaders_DATA = $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.eo.hh
dist_installed_eldbuscxxmainheaders_DATA = \
bindings/cxx/eldbus_cxx/eldbus_basic.hh \
bindings/cxx/eldbus_cxx/eldbus_error.hh \
@@ -89,16 +72,15 @@ bindings/cxx/eldbus_cxx/eldbus_message.hh \
bindings/cxx/eldbus_cxx/eldbus_proxy_call.hh \
bindings/cxx/eldbus_cxx/eldbus_raw_tuple.hh \
bindings/cxx/eldbus_cxx/eldbus_service.hh \
-bindings/cxx/eldbus_cxx/eldbus_signature_traits.hh
+bindings/cxx/eldbus_cxx/eldbus_signature_traits.hh \
+bindings/cxx/eldbus_cxx/Eldbus_Model.hh
-lib/eldbus/Eldbus_Model.hh: $(eldbus_eolian_cxx_hh)
- @echo @ECHO_E@ "#ifndef EFL_CXX_ELDBUS_MODEL_HH\n#define EFL_CXX_ELDBUS_MODEL_HH\n" > $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh
- @echo @ECHO_E@ "#include <Eldbus_Model.h>" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh
- @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh
- @for i in $(eldbus_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh; done
- @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh
+lib/eldbus/Eldbus_Model.eo.hh: $(eldbus_eolian_files) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
-CLEANFILES += $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.hh
+CLEANFILES += $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.eo.hh
### Eet C++
installed_eetcxxheadersdir = $(includedir)/eet-cxx-@VMAJ@
@@ -110,15 +92,15 @@ bindings/cxx/eet_cxx/Eet.hh
### Generated headers src/lib/edje
installed_edjecxxmainheadersdir = $(includedir)/edje-cxx-@VMAJ@/
-nodist_installed_edjecxxmainheaders_DATA = $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.hh
+dist_installed_edjecxxmainheaders_DATA = lib/edje/Edje.hh
+nodist_installed_edjecxxmainheaders_DATA = $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.eo.hh
-lib/edje/Edje.hh: $(edje_eolian_cxx_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 $(edje_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/edje/Edje.hh; done
- @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh
+lib/edje/Edje.eo.hh: $(edje_eolian_files) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
-CLEANFILES += $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.hh
+CLEANFILES += $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.eo.hh
### Ecore src/lib/ecore
installed_ecorecxxheadersdir = $(includedir)/ecore-cxx-@VMAJ@
@@ -129,11 +111,10 @@ bindings/cxx/ecore_cxx/Ecore_Manual.hh
nodist_installed_ecorecxxheaders_DATA = $(ecore_eolian_cxx_hh) $(ecore_eolian_cxx_impl_hh) \
lib/ecore/Ecore.eo.hh
-lib/ecore/Ecore.eo.hh: $(ecore_eolian_cxx_hh) $(eo_eolian_cxx_hh) $(efl_eolian_cxx_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 $(ecore_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh; done
- @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
+lib/ecore/Ecore.eo.hh: $(ecore_eolian_files_public) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
CLEANFILES += $(ecore_eolian_cxx_hh) $(ecore_eolian_cxx_impl_hh) lib/ecore/Ecore.eo.hh
@@ -180,15 +161,15 @@ bindings/cxx/eina_cxx/Eina.hh
### Eio
installed_eiocxxmainheadersdir = $(includedir)/eio-cxx-@VMAJ@/
-nodist_installed_eiocxxmainheaders_DATA = $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.hh
+nodist_installed_eiocxxmainheaders_DATA = $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.eo.hh
+dist_installed_eiocxxmainheaders_DATA = lib/eio/Eio.hh
-lib/eio/Eio.hh: $(eio_eolian_cxx_hh)
- @echo @ECHO_E@ "#ifndef EFL_CXX_EIO_HH\n#define EFL_CXX_EIO_HH\n" > $(top_builddir)/src/lib/eio/Eio.hh
- @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/eio/Eio.hh
- @for i in $(eio_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/eio/Eio.hh; done
- @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/eio/Eio.hh
+lib/eio/Eio.eo.hh: $(eio_eolian_files) $(_EOLIAN_CXX_DEP)
+ $(AM_V_EOLCXX) \
+ $(MKDIR_P) $(dir $@); \
+ $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
-CLEANFILES += $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.hh
+CLEANFILES += $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.eo.hh
### Tests