summaryrefslogtreecommitdiff
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
parent7f148feea8275d4ae3a366e5aead8170498089a6 (diff)
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
21### Elementary C++ 21### Elementary C++
22installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/ 22installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
23nodist_installed_elementarycxxmainheaders_DATA = $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) \ 23nodist_installed_elementarycxxmainheaders_DATA = $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) \
24lib/elementary/Elementary.hh 24lib/elementary/Elementary.eo.hh
25 25dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Elementary.hh
26lib/elementary/Elementary.hh: $(elementary_eolian_cxx_hh) 26
27 @echo @ECHO_E@ "#ifndef EFL_CXX_ELEMENTARY_HH\n#define EFL_CXX_ELEMENTARY_HH\n" > $(top_builddir)/src/lib/elementary/Elementary.hh 27lib/elementary/Elementary.eo.hh: $(elm_public_eolian_files) $(_EOLIAN_CXX_DEP)
28 @echo @ECHO_E@ "#if defined(ELEMENTARY_H) || defined(ELM_WIDGET_H)" >> $(top_builddir)/src/lib/elementary/Elementary.hh 28 $(AM_V_EOLCXX) \
29 @echo @ECHO_E@ "#error Do not include Elm C API headers before including Elementary.hh" >> $(top_builddir)/src/lib/elementary/Elementary.hh 29 $(MKDIR_P) $(dir $@); \
30 @echo @ECHO_E@ "#endif" >> $(top_builddir)/src/lib/elementary/Elementary.hh 30 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
31 @echo @ECHO_E@ "" >> $(top_builddir)/src/lib/elementary/Elementary.hh 31
32 @echo @ECHO_E@ "#ifndef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh 32CLEANFILES += $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) lib/elementary/Elementary.eo.hh
33 @echo @ECHO_E@ "#define EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
34 @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
35 @echo @ECHO_E@ "#ifndef EFL_EO_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
36 @echo @ECHO_E@ "#define EFL_EO_API_SUPPORT" >> $(top_builddir)/src/lib/elementary/Elementary.hh
37 @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
38 @echo @ECHO_E@ "#ifndef ELM_INTERNAL_API_ARGESFSDFEFC" >> $(top_builddir)/src/lib/elementary/Elementary.hh
39 @echo @ECHO_E@ "#define ELM_INTERNAL_API_ARGESFSDFEFC" >> $(top_builddir)/src/lib/elementary/Elementary.hh
40 @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
41 @echo @ECHO_E@ "extern \"C\" {" >> $(top_builddir)/src/lib/elementary/Elementary.hh
42 @echo @ECHO_E@ "#include \"Elementary.h\"" >> $(top_builddir)/src/lib/elementary/Elementary.hh
43 @echo @ECHO_E@ "#include \"elm_widget.h\"" >> $(top_builddir)/src/lib/elementary/Elementary.hh
44 @echo @ECHO_E@ "}" >> $(top_builddir)/src/lib/elementary/Elementary.hh
45 @echo @ECHO_E@ "" >> $(top_builddir)/src/lib/elementary/Elementary.hh
46 @for i in $(elementary_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/elementary/Elementary.hh; done
47 @echo @ECHO_E@ "#endif\n" >> $(top_builddir)/src/lib/elementary/Elementary.hh
48
49CLEANFILES += $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) lib/elementary/Elementary.hh
50 33
51### Efl C++ 34### Efl C++
52installed_eflcxxmainheadersdir = $(includedir)/efl-cxx-@VMAJ@/ 35installed_eflcxxmainheadersdir = $(includedir)/efl-cxx-@VMAJ@/
53nodist_installed_eflcxxmainheaders_DATA = $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.hh 36nodist_installed_eflcxxmainheaders_DATA = $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.eo.hh
37dist_installed_eflcxxmainheaders_DATA = lib/efl/Efl.hh
54 38
55lib/efl/Efl.hh: $(efl_eolian_cxx_hh) 39lib/efl/Efl.eo.hh: $(efl_eolian_files) $(_EOLIAN_CXX_DEP)
56 @echo @ECHO_E@ "#ifndef EFL_CXX_HH\n#define EFL_CXX_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh 40 $(AM_V_EOLCXX) \
57 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/efl/Efl.hh 41 $(MKDIR_P) $(dir $@); \
58 @for i in $(efl_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/efl/Efl.hh; done 42 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
59 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh
60 43
61CLEANFILES += $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.hh 44CLEANFILES += $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.hh
62 45
63### Evas C++ 46### Evas C++
64installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/ 47installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
65nodist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh 48dist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
49nodist_installed_evascxxmainheaders_DATA = lib/evas/Evas.eo.hh
66 50
67installed_evascxxcanvasheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas 51installed_evascxxcanvasheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas
68nodist_installed_evascxxcanvasheaders_DATA = $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh) 52nodist_installed_evascxxcanvasheaders_DATA = $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh)
69 53
70lib/evas/Evas.hh: $(evas_eolian_cxx_hh) 54lib/evas/Evas.eo.hh: $(evas_eolian_pub_files) $(_EOLIAN_CXX_DEP)
71 @echo @ECHO_E@ "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh 55 $(AM_V_EOLCXX) \
72 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh 56 $(MKDIR_P) $(dir $@); \
73 @for i in $(evas_eolian_cxx_hh); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done 57 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
74 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh
75 58
76CLEANFILES += $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh) lib/evas/Evas.hh 59CLEANFILES += $(evas_eolian_cxx_hh) $(evas_eolian_cxx_impl_hh) lib/evas/Evas.eo.hh
77 60
78### Eldbus C++ 61### Eldbus C++
79installed_eldbuscxxmainheadersdir = $(includedir)/eldbus_cxx-@VMAJ@ 62installed_eldbuscxxmainheadersdir = $(includedir)/eldbus_cxx-@VMAJ@
80nodist_installed_eldbuscxxmainheaders_DATA = $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.hh 63nodist_installed_eldbuscxxmainheaders_DATA = $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.eo.hh
81dist_installed_eldbuscxxmainheaders_DATA = \ 64dist_installed_eldbuscxxmainheaders_DATA = \
82bindings/cxx/eldbus_cxx/eldbus_basic.hh \ 65bindings/cxx/eldbus_cxx/eldbus_basic.hh \
83bindings/cxx/eldbus_cxx/eldbus_error.hh \ 66bindings/cxx/eldbus_cxx/eldbus_error.hh \
@@ -89,16 +72,15 @@ bindings/cxx/eldbus_cxx/eldbus_message.hh \
89bindings/cxx/eldbus_cxx/eldbus_proxy_call.hh \ 72bindings/cxx/eldbus_cxx/eldbus_proxy_call.hh \
90bindings/cxx/eldbus_cxx/eldbus_raw_tuple.hh \ 73bindings/cxx/eldbus_cxx/eldbus_raw_tuple.hh \
91bindings/cxx/eldbus_cxx/eldbus_service.hh \ 74bindings/cxx/eldbus_cxx/eldbus_service.hh \
92bindings/cxx/eldbus_cxx/eldbus_signature_traits.hh 75bindings/cxx/eldbus_cxx/eldbus_signature_traits.hh \
76bindings/cxx/eldbus_cxx/Eldbus_Model.hh
93 77
94lib/eldbus/Eldbus_Model.hh: $(eldbus_eolian_cxx_hh) 78lib/eldbus/Eldbus_Model.eo.hh: $(eldbus_eolian_files) $(_EOLIAN_CXX_DEP)
95 @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 79 $(AM_V_EOLCXX) \
96 @echo @ECHO_E@ "#include <Eldbus_Model.h>" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh 80 $(MKDIR_P) $(dir $@); \
97 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh 81 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
98 @for i in $(eldbus_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh; done
99 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/eldbus/Eldbus_Model.hh
100 82
101CLEANFILES += $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.hh 83CLEANFILES += $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.eo.hh
102 84
103### Eet C++ 85### Eet C++
104installed_eetcxxheadersdir = $(includedir)/eet-cxx-@VMAJ@ 86installed_eetcxxheadersdir = $(includedir)/eet-cxx-@VMAJ@
@@ -110,15 +92,15 @@ bindings/cxx/eet_cxx/Eet.hh
110 92
111### Generated headers src/lib/edje 93### Generated headers src/lib/edje
112installed_edjecxxmainheadersdir = $(includedir)/edje-cxx-@VMAJ@/ 94installed_edjecxxmainheadersdir = $(includedir)/edje-cxx-@VMAJ@/
113nodist_installed_edjecxxmainheaders_DATA = $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.hh 95dist_installed_edjecxxmainheaders_DATA = lib/edje/Edje.hh
96nodist_installed_edjecxxmainheaders_DATA = $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.eo.hh
114 97
115lib/edje/Edje.hh: $(edje_eolian_cxx_hh) 98lib/edje/Edje.eo.hh: $(edje_eolian_files) $(_EOLIAN_CXX_DEP)
116 @echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/edje/Edje.hh 99 $(AM_V_EOLCXX) \
117 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/edje/Edje.hh 100 $(MKDIR_P) $(dir $@); \
118 @for i in $(edje_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/edje/Edje.hh; done 101 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
119 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/edje/Edje.hh
120 102
121CLEANFILES += $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.hh 103CLEANFILES += $(edje_eolian_cxx_hh) $(edje_eolian_cxx_impl_hh) lib/edje/Edje.eo.hh
122 104
123### Ecore src/lib/ecore 105### Ecore src/lib/ecore
124installed_ecorecxxheadersdir = $(includedir)/ecore-cxx-@VMAJ@ 106installed_ecorecxxheadersdir = $(includedir)/ecore-cxx-@VMAJ@
@@ -129,11 +111,10 @@ bindings/cxx/ecore_cxx/Ecore_Manual.hh
129nodist_installed_ecorecxxheaders_DATA = $(ecore_eolian_cxx_hh) $(ecore_eolian_cxx_impl_hh) \ 111nodist_installed_ecorecxxheaders_DATA = $(ecore_eolian_cxx_hh) $(ecore_eolian_cxx_impl_hh) \
130lib/ecore/Ecore.eo.hh 112lib/ecore/Ecore.eo.hh
131 113
132lib/ecore/Ecore.eo.hh: $(ecore_eolian_cxx_hh) $(eo_eolian_cxx_hh) $(efl_eolian_cxx_hh) 114lib/ecore/Ecore.eo.hh: $(ecore_eolian_files_public) $(_EOLIAN_CXX_DEP)
133 @echo @ECHO_E@ "#ifndef EFL_CXX_ECORE_HH\n#define EFL_CXX_ECORE_HH\n" > $(top_builddir)/src/lib/ecore/Ecore.eo.hh 115 $(AM_V_EOLCXX) \
134 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh 116 $(MKDIR_P) $(dir $@); \
135 @for i in $(ecore_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh; done 117 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
136 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/ecore/Ecore.eo.hh
137 118
138CLEANFILES += $(ecore_eolian_cxx_hh) $(ecore_eolian_cxx_impl_hh) lib/ecore/Ecore.eo.hh 119CLEANFILES += $(ecore_eolian_cxx_hh) $(ecore_eolian_cxx_impl_hh) lib/ecore/Ecore.eo.hh
139 120
@@ -180,15 +161,15 @@ bindings/cxx/eina_cxx/Eina.hh
180 161
181### Eio 162### Eio
182installed_eiocxxmainheadersdir = $(includedir)/eio-cxx-@VMAJ@/ 163installed_eiocxxmainheadersdir = $(includedir)/eio-cxx-@VMAJ@/
183nodist_installed_eiocxxmainheaders_DATA = $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.hh 164nodist_installed_eiocxxmainheaders_DATA = $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.eo.hh
165dist_installed_eiocxxmainheaders_DATA = lib/eio/Eio.hh
184 166
185lib/eio/Eio.hh: $(eio_eolian_cxx_hh) 167lib/eio/Eio.eo.hh: $(eio_eolian_files) $(_EOLIAN_CXX_DEP)
186 @echo @ECHO_E@ "#ifndef EFL_CXX_EIO_HH\n#define EFL_CXX_EIO_HH\n" > $(top_builddir)/src/lib/eio/Eio.hh 168 $(AM_V_EOLCXX) \
187 @echo @ECHO_E@ "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/eio/Eio.hh 169 $(MKDIR_P) $(dir $@); \
188 @for i in $(eio_eolian_cxx_hh); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/eio/Eio.hh; done 170 $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^)
189 @echo @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/eio/Eio.hh
190 171
191CLEANFILES += $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.hh 172CLEANFILES += $(eio_eolian_cxx_hh) $(eio_eolian_cxx_impl_hh) lib/eio/Eio.eo.hh
192 173
193### Tests 174### Tests
194 175