cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=814982389759069625f4fb0c460436a8f4d894c6

commit 814982389759069625f4fb0c460436a8f4d894c6
Author: Felipe Magno de Almeida <[email protected]>
Date:   Sun May 4 12:19:39 2014 +0200

    eolian-cxx: fix make distcheck and automake files for Eolian C++
    
    Summary:
    Fixed distcheck for Eolian C++. Made the generated files as
    nodist so it doesn't get picked up for generation way too
    early.
    
    Reviewers: cedric, seoz
    
    CC: cedric
    
    Maniphest Tasks: T1220
    
    Differential Revision: https://phab.enlightenment.org/D820
    
    Signed-off-by: Cedric Bail <[email protected]>
---
 Makefile.am                      |  5 ++-
 configure.ac                     | 86 ++++++++++++++++++++++++++++++++++++++++
 m4/efl.m4                        |  2 +-
 pc/.gitignore                    |  4 +-
 pc/ecore-audio-cxx.pc.in         | 12 ++++++
 pc/ecore-cxx.pc.in               | 16 ++++++++
 pc/edje-cxx.pc.in                | 23 +++++++++++
 src/Makefile.am                  |  6 +--
 src/Makefile_Ecore_Audio_Cxx.am  | 46 +++++++++------------
 src/Makefile_Ecore_Cxx.am        | 30 +++++---------
 src/Makefile_Edje_Cxx.am         | 31 +++------------
 src/Makefile_Eet_Cxx.am          |  8 +---
 src/Makefile_Eina_Cxx.am         |  6 +--
 src/Makefile_Eo_Cxx.am           |  3 +-
 src/Makefile_Eolian_Cxx.am       | 61 +++++++++++++---------------
 src/Makefile_Evas_Cxx.am         | 37 +++++------------
 src/bin/eolian_cxx/eolian_cxx.cc | 36 +++++++++++++----
 src/examples/evas/.gitignore     |  1 +
 src/examples/evas/Makefile.am    | 15 +++----
 19 files changed, 262 insertions(+), 166 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4bdb077..d18778d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,8 +126,10 @@ pc/eo-cxx.pc \
 pc/eolian.pc \
 pc/eolian-cxx.pc \
 pc/eet.pc \
+pc/eet-cxx.pc \
 pc/evas.pc \
 pc/ecore.pc \
+pc/ecore-cxx.pc \
 pc/ecore-con.pc \
 pc/ecore-ipc.pc \
 pc/ecore-file.pc \
@@ -144,6 +146,7 @@ pc/efreet.pc \
 pc/efreet-mime.pc \
 pc/efreet-trash.pc \
 pc/edje.pc \
+pc/edje-cxx.pc \
 pc/emotion.pc \
 pc/ethumb.pc \
 pc/ethumb_client.pc \
@@ -242,7 +245,7 @@ pkgconfig_DATA += pc/ephysics.pc
 endif
 
 if HAVE_ECORE_AUDIO
-pkgconfig_DATA += pc/ecore-audio.pc
+pkgconfig_DATA += pc/ecore-audio.pc pc/ecore-audio-cxx.pc
 endif
 
 # Cmake configs:
diff --git a/configure.ac b/configure.ac
index 40e297e..777e846 100644
--- a/configure.ac
+++ b/configure.ac
@@ -960,6 +960,9 @@ fi
 
 AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" -a "xyes"])
 
+EFL_INTERNAL_DEPEND_PKG([EINA_CXX], [Eina])
+EFL_EVAL_PKGS([EINA_CXX])
+
 EFL_LIB_END([Eina_Cxx])
 #### End of Eina CXX
 
@@ -1010,6 +1013,16 @@ EFL_EVAL_PKGS([EET])
 EFL_LIB_END([Eet])
 #### End of Eet
 
+#### Eet CXX
+EFL_LIB_START([Eet_Cxx])
+
+EFL_INTERNAL_DEPEND_PKG([EET_CXX], [Eina_Cxx])
+EFL_INTERNAL_DEPEND_PKG([EET_CXX], [Eet])
+
+EFL_EVAL_PKGS([EET_CXX])
+
+EFL_LIB_END([Eet_Cxx])
+#### End of Eet CXX
 
 #### Eo
 
@@ -1050,6 +1063,14 @@ AM_CONDITIONAL([EO_BUILD_EXAMPLE_EVAS], [test 
"x${have_elm}" = "xyes"])
 EFL_LIB_END([Eo])
 #### End of Eo
 
+#### Eo CXX
+EFL_LIB_START([Eo_Cxx])
+
+EFL_EVAL_PKGS([EO_CXX])
+
+EFL_LIB_END([Eo_Cxx])
+#### End of Eo CXX
+
 #### Eolian
 
 EFL_LIB_START([Eolian])
@@ -1084,6 +1105,33 @@ EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
 EFL_LIB_END([Eolian])
 #### End of Eolian
 
+EFL_LIB_START([Eolian_Cxx])
+### Default values
+
+### Additional options to configure
+
+### Checks for programs
+
+## Compatibility layers
+
+### Checks for libraries
+EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
+EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eo])
+
+### Checks for header files
+
+### Checks for types
+
+### Checks for structures
+
+### Checks for compiler characteristics
+
+### Checks for linker characteristics
+
+### Checks for library functions
+
+### Check availability
+EFL_LIB_END([Eolian_Cxx])
 
 #### Evas
 
@@ -1884,6 +1932,13 @@ EFL_ADD_FEATURE([EVAS], [dither-mask], 
[${build_evas_dither_mask}])
 EFL_LIB_END([Evas])
 #### End of Evas
 
+#### Edje CXX
+EFL_LIB_START([Evas_Cxx])
+
+EFL_EVAL_PKGS([EVAS_CXX])
+
+EFL_LIB_END([Evas_Cxx])
+#### End of Edje CXX
 
 #### Embryo
 
@@ -2198,6 +2253,18 @@ fi
 EFL_LIB_END([Ecore])
 #### End of Ecore
 
+#### Ecore CXX
+EFL_LIB_START([Ecore_Cxx])
+
+EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eina_Cxx])
+EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Ecore])
+EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eina])
+EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eo])
+
+EFL_EVAL_PKGS([ECORE_CXX])
+
+EFL_LIB_END([Ecore_Cxx])
+#### End of Ecore CXX
 
 #### Ecore_Con
 
@@ -2769,6 +2836,14 @@ AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test 
"x${want_sndfile}" = "xyes"])
 
 #### End of Ecore_Audio
 
+#### Ecore Audio CXX
+EFL_LIB_START([Ecore_Audio_Cxx])
+
+EFL_EVAL_PKGS([ECORE_AUDIO_CXX])
+
+EFL_LIB_END([Ecore_Audio_Cxx])
+#### End of Ecore Audio CXX
+
 #### Ecore_Win32
 EFL_LIB_START_OPTIONAL([Ecore_Win32], [test "${have_win32}" = "yes"])
 
@@ -3882,6 +3957,14 @@ sys/wait.h \
 EFL_LIB_END([Edje])
 #### End of Edje
 
+#### Edje CXX
+EFL_LIB_START([Edje_Cxx])
+
+EFL_EVAL_PKGS([EDJE_CXX])
+
+EFL_LIB_END([Edje_Cxx])
+#### End of Edje CXX
+
 #### Emotion
 EFL_LIB_START([Emotion])
 
@@ -4142,6 +4225,7 @@ pc/evas-drm.pc
 pc/evas.pc
 pc/evas-cxx.pc
 pc/ecore.pc
+pc/ecore-cxx.pc
 pc/ecore-con.pc
 pc/ecore-ipc.pc
 pc/ecore-file.pc
@@ -4160,6 +4244,7 @@ pc/ecore-evas.pc
 pc/ecore-imf.pc
 pc/ecore-imf-evas.pc
 pc/ecore-audio.pc
+pc/ecore-audio-cxx.pc
 pc/ecore-avahi.pc
 pc/embryo.pc
 pc/eio.pc
@@ -4170,6 +4255,7 @@ pc/efreet-trash.pc
 pc/eeze.pc
 pc/ephysics.pc
 pc/edje.pc
+pc/edje-cxx.pc
 pc/emotion.pc
 pc/ethumb.pc
 pc/ethumb_client.pc
diff --git a/m4/efl.m4 b/m4/efl.m4
index 5c75ab3..b820b0f 100644
--- a/m4/efl.m4
+++ b/m4/efl.m4
@@ -366,7 +366,7 @@ m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} 
${EFL_COV_LIBS} ${EFL_LIBS} ${m4_d
 m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} 
${requirements_internal_libs_[]m4_defn([DOWN])}"
 USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} 
lib/${libdirname}/lib${libname}.la"
 USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} 
lib/${libdirname}/lib${libname}.la"
-m4_defn([UP])_CFLAGS="${EFL_COV_CFLAGS} ${EFL_CFLAGS} ${m4_defn([UP])_CFLAGS} 
-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} 
${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl} 
-DEFL_[]m4_defn([UP])_BUILD=1"
+m4_defn([UP])_CFLAGS="${EFL_COV_CFLAGS} ${EFL_CFLAGS} ${m4_defn([UP])_CFLAGS} 
-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} 
-I\$(top_srcdir)/src/bindings/${libdirname} 
-I\$(top_builddir)/src/bindings/${libdirname} 
${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl} 
-DEFL_[]m4_defn([UP])_BUILD=1"
 requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} 
${requirements_pc_efl}"
 
requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])}
 ${requirements_pc_deps_efl}"
 
diff --git a/pc/.gitignore b/pc/.gitignore
index f872dd5..911d9a9 100644
--- a/pc/.gitignore
+++ b/pc/.gitignore
@@ -55,4 +55,6 @@
 /eolian-cxx.pc
 /eo-cxx.pc
 /evas-cxx.pc
-/ecore-audio-cxx.pc.in
+/ecore-cxx.pc
+/edje-cxx.pc
+/ecore-audio-cxx.pc
diff --git a/pc/ecore-audio-cxx.pc.in b/pc/ecore-audio-cxx.pc.in
new file mode 100644
index 0000000..6e40f21
--- /dev/null
+++ b/pc/ecore-audio-cxx.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ecore-audio-cxx
+Description: E core library, audio module C++ API
+Requires.private: @requirements_pc_ecore_audio@
+Version: @VERSION@
+Libs: -L${libdir} -lecore_audio
+Libs.private: @requirements_libs_ecore_audio@
+Cflags: -I${includedir}/efl-@VMAJ@ -I${includedir}/efl-@VMAJ@ 
-I${includedir}/ecore-audio-@VMAJ@ -I${includedir}/ecore-audio-cxx-@VMAJ@
diff --git a/pc/ecore-cxx.pc.in b/pc/ecore-cxx.pc.in
new file mode 100644
index 0000000..3951447
--- /dev/null
+++ b/pc/ecore-cxx.pc.in
@@ -0,0 +1,16 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+modules=@libdir@/ecore
+module_arch=@MODULE_ARCH@
+eoincludedir=@datarootdir@/eolian/include
+eolian_flags=-I${eoincludedir}/ecore-@VMAJ@
+
+Name: ecore C++ API
+Description: Ecore event abstraction library C++ API
+Requires.private: @requirements_pc_ecore@
+Version: @VERSION@
+Libs: -L${libdir} -lecore
+Libs.private: @requirements_libs_ecore@
+Cflags: -I${includedir}/efl-@VMAJ@ -I${includedir}/ecore-@VMAJ@ 
-I${includedir}/ecore-cxx-@VMAJ@
diff --git a/pc/edje-cxx.pc.in b/pc/edje-cxx.pc.in
new file mode 100644
index 0000000..45e47c4
--- /dev/null
+++ b/pc/edje-cxx.pc.in
@@ -0,0 +1,23 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+modules=@libdir@/edje/modules
+module_arch=@MODULE_ARCH@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@/edje
+vmaj=@VMAJ@
+vmin=@VMIN@
+vmic=@VMIC@
+multisense=@want_multisense@
+physics=@want_physics@
+eoincludedir=@datarootdir@/eolian/include
+eolian_flags=-I${eoincludedir}/edje-@VMAJ@
+
+Name: edje C++ API
+Description: Enlightened graphical design and layout engine C++ API.
+Requires.private: @requirements_pc_edje@
+Version: @VERSION@
+Libs: -L${libdir} -ledje
+Libs.private: @requirements_libs_edje@
+Cflags: -I${includedir}/efl-@VMAJ@ -I${includedir}/edje-@VMAJ@ 
-I${includedir}/edje-cxx-@VMAJ@
diff --git a/src/Makefile.am b/src/Makefile.am
index 2e9a133..a4d0a69 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,6 @@ include Makefile_Escape.am
 include Makefile_Eina.am
 include Makefile_Eo.am
 include Makefile_Eet.am
-include Makefile_Eet_Cxx.am
 include Makefile_Eolian.am
 include Makefile_Evas.am
 include Makefile_Ecore.am
@@ -58,7 +57,6 @@ include Makefile_Ecore_Evas.am
 include Makefile_Ecore_Audio.am
 include Makefile_Ecore_Audio_Cxx.am
 include Makefile_Ecore_Avahi.am
-include Makefile_Evas_Cxx.am
 include Makefile_Embryo.am
 include Makefile_Eio.am
 include Makefile_Eldbus.am
@@ -70,10 +68,12 @@ include Makefile_Emotion.am
 include Makefile_Ethumb.am
 include Makefile_Ethumb_Client.am
 
-include Makefile_Eolian_Cxx.am
 include Makefile_Eina_Cxx.am
+include Makefile_Eolian_Cxx.am
+include Makefile_Eet_Cxx.am
 include Makefile_Eo_Cxx.am
 include Makefile_Edje_Cxx.am
+include Makefile_Evas_Cxx.am
 
 .PHONY: benchmark examples
 
diff --git a/src/Makefile_Ecore_Audio_Cxx.am b/src/Makefile_Ecore_Audio_Cxx.am
index edf23a9..94ebc43 100644
--- a/src/Makefile_Ecore_Audio_Cxx.am
+++ b/src/Makefile_Ecore_Audio_Cxx.am
@@ -3,7 +3,8 @@ if HAVE_CXX11
 
 ### Generated headers
 
-generated_ecore_audio_cxx_bindings = \
+generated_ecore_audio_cxx_bindings =
+#\
 lib/ecore_audio/ecore_audio.eo.hh \
 lib/ecore_audio/ecore_audio_in.eo.hh \
 lib/ecore_audio/ecore_audio_out.eo.hh \
@@ -12,7 +13,7 @@ lib/ecore_audio/ecore_audio_out_sndfile.eo.hh \
 lib/ecore_audio/ecore_audio_out_pulse.eo.hh \
 lib/ecore_audio/ecore_audio_in_tone.eo.hh
 
-BUILT_SOURCES += \
+#BUILT_SOURCES += \
 lib/ecore_audio/Ecore_Audio.hh \
 $(generated_ecore_audio_cxx_bindings)
 
@@ -23,36 +24,27 @@ lib/ecore_audio/Ecore_Audio.hh:
        @echo -e "#endif\n\n#endif\n" >> 
$(top_builddir)/src/lib/ecore_audio/Ecore_Audio.hh
 
 installed_ecoreaudiocxxmainheadersdir = $(includedir)/ecore-audio-cxx-@VMAJ@
-dist_installed_ecoreaudiocxxmainheaders_DATA = \
+#dist_installed_ecoreaudiocxxmainheaders_DATA = \
 lib/ecore_audio/Ecore_Audio.hh \
 $(generated_ecore_audio_cxx_bindings)
 
 ### Unit tests
 
-if EFL_ENABLE_TESTS
-
-check_PROGRAMS += tests/ecore_audio_cxx/cxx_compile_test
-TESTS += tests/ecore_audio_cxx/cxx_compile_test
-
-tests_ecore_audio_cxx_cxx_compile_test_SOURCES = 
tests/ecore_audio_cxx/cxx_compile_test.cc
-tests_ecore_audio_cxx_cxx_compile_test_CPPFLAGS = 
-I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/lib/efl \
--I$(top_srcdir)/src/lib/ecore_audio \
--I$(top_builddir)/src/lib/ecore_audio \
--I$(top_srcdir)/src/lib/ecore \
--I$(top_builddir)/src/lib/ecore \
--I$(top_srcdir)/src/lib/eo \
--I$(top_builddir)/src/lib/eo \
--I$(top_srcdir)/src/bindings/eo_cxx \
--I$(top_builddir)/src/bindings/eo_cxx \
--I$(top_srcdir)/src/bindings/ecore_cxx \
--I$(top_builddir)/src/bindings/ecore_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
--DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_audio_cxx\" \
--DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_audio_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@
-tests_ecore_audio_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
-tests_ecore_audio_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
+# if EFL_ENABLE_TESTS
 
-endif
+# check_PROGRAMS += tests/ecore_audio_cxx/cxx_compile_test
+# TESTS += tests/ecore_audio_cxx/cxx_compile_test
+
+# tests_ecore_audio_cxx_cxx_compile_test_SOURCES = 
tests/ecore_audio_cxx/cxx_compile_test.cc
+# tests_ecore_audio_cxx_cxx_compile_test_CPPFLAGS = 
-I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/lib/efl \
+# -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_audio_cxx\" \
+# -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_audio_cxx\" \
+# @CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@ @EO_CFLAGS@ @ECORE_AUDIO_CFLAGS@ 
\
+# @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EO_CXX_CFLAGS@ @ECORE_AUDIO_CXX_CFLAGS@
+
+# tests_ecore_audio_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
+# tests_ecore_audio_cxx_cxx_compile_test_DEPENDENCIES = 
@USE_ECORE_INTERNAL_LIBS@
+
+# endif
 
 endif
diff --git a/src/Makefile_Ecore_Cxx.am b/src/Makefile_Ecore_Cxx.am
index ec2b64a..63f3cfc 100644
--- a/src/Makefile_Ecore_Cxx.am
+++ b/src/Makefile_Ecore_Cxx.am
@@ -14,12 +14,10 @@ lib/ecore/ecore_idle_exiter.eo.hh \
 lib/ecore/ecore_animator.eo.hh \
 lib/ecore/ecore_parent.eo.hh
 
-BUILT_SOURCES += \
-lib/ecore/Ecore.eo.hh \
-$(generated_ecore_cxx_bindings)
+BUILT_SOURCES += lib/ecore/Ecore.eo.hh $(generated_ecore_cxx_bindings)
 
 installed_ecorecxxheadersdir = $(includedir)/ecore-cxx-@VMAJ@
-dist_installed_ecorecxxheaders_DATA = \
+nodist_installed_ecorecxxheaders_DATA = \
 lib/ecore/Ecore.eo.hh \
 $(generated_ecore_cxx_bindings)
 
@@ -44,29 +42,21 @@ tests/ecore_cxx/ecore_cxx_suite.cc \
 tests/ecore_cxx/ecore_cxx_test_safe_call.cc
 
 tests_ecore_cxx_ecore_cxx_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
--I$(top_srcdir)/src/bindings/ecore_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
--I$(top_srcdir)/src/bindings/eo_cxx \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
-@CHECK_CFLAGS@ \
-@ECORE_CFLAGS@ \
-@EINA_CFLAGS@
+@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
+@ECORE_CFLAGS@ @EO_CFLAGS@ @EO_CXX_CFLAGS@
 
-tests_ecore_cxx_ecore_cxx_suite_LDADD = \
-@CHECK_LIBS@ \
-@USE_ECORE_LIBS@
-tests_ecore_cxx_ecore_cxx_suite_DEPENDENCIES = \
-@USE_ECORE_INTERNAL_LIBS@
+tests_ecore_cxx_ecore_cxx_suite_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
+tests_ecore_cxx_ecore_cxx_suite_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
 
 tests_ecore_cxx_cxx_compile_test_SOURCES = tests/ecore_cxx/cxx_compile_test.cc
-tests_ecore_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
-I$(top_builddir)/src/lib/efl \
--I$(top_srcdir)/src/bindings/ecore_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
--I$(top_srcdir)/src/bindings/eo_cxx \
+tests_ecore_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@
+@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
+@ECORE_CFLAGS@ @EO_CFLAGS@ @EO_CXX_CFLAGS@
+
 tests_ecore_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
 tests_ecore_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
 
diff --git a/src/Makefile_Edje_Cxx.am b/src/Makefile_Edje_Cxx.am
index 094855d..91fc9b9 100644
--- a/src/Makefile_Edje_Cxx.am
+++ b/src/Makefile_Edje_Cxx.am
@@ -11,13 +11,8 @@ BUILT_SOURCES += \
 lib/edje/Edje.hh \
 $(generated_edje_cxx_bindings)
 
-EXTRA_DIST += \
-lib/edje/Edje.hh \
-$(edje_cxx_bindngs)
-
 installed_edjecxxmainheadersdir = $(includedir)/edje-cxx-@VMAJ@/
-
-dist_installed_edjecxxmainheaders_DATA = \
+nodist_installed_edjecxxmainheaders_DATA = \
 lib/edje/Edje.hh \
 $(generated_edje_cxx_bindings)
 
@@ -35,27 +30,13 @@ check_PROGRAMS += tests/edje_cxx/cxx_compile_test
 TESTS += tests/edje_cxx/cxx_compile_test
 
 tests_edje_cxx_cxx_compile_test_SOURCES = tests/edje_cxx/cxx_compile_test.cc
-tests_edje_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
-I$(top_builddir)/src/lib/efl \
--I$(top_srcdir)/src/lib/edje \
--I$(top_builddir)/src/lib/edje \
--I$(top_srcdir)/src/lib/evas \
--I$(top_builddir)/src/lib/evas \
--I$(top_srcdir)/src/lib/evas/canvas \
--I$(top_builddir)/src/lib/evas/canvas \
--I$(top_srcdir)/src/lib/ecore \
--I$(top_builddir)/src/lib/ecore \
--I$(top_srcdir)/src/lib/eo \
--I$(top_builddir)/src/lib/eo \
--I$(top_srcdir)/src/bindings/eo_cxx \
--I$(top_builddir)/src/bindings/eo_cxx \
--I$(top_srcdir)/src/bindings/ecore_cxx \
--I$(top_builddir)/src/bindings/ecore_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
+tests_edje_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje_cxx\" \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edje_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@
-tests_edje_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
-tests_edje_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
+@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EDJE_CXX_CFLAGS@ 
@EO_CXX_CFLAGS@ \
+@ECORE_CFLAGS@ @EINA_CFLAGS@ @EVAS_CFLAGS@ @EDJE_CFLAGS@ @EO_CFLAGS@
+tests_edje_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_EDJE_LIBS@
+tests_edje_cxx_cxx_compile_test_DEPENDENCIES = @USE_EDJE_INTERNAL_LIBS@
 
 endif
 
diff --git a/src/Makefile_Eet_Cxx.am b/src/Makefile_Eet_Cxx.am
index 4686de6..4d608f0 100644
--- a/src/Makefile_Eet_Cxx.am
+++ b/src/Makefile_Eet_Cxx.am
@@ -26,15 +26,11 @@ tests/eet_cxx/eet_cxx_test_descriptors.cc
 
 tests_eet_cxx_eet_cxx_suite_CPPFLAGS =         \
 -I$(top_builddir)/src/lib/efl \
--I$(top_builddir)/src/bindings/eina_cxx \
--I$(top_builddir)/src/bindings/eet_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
--I$(top_srcdir)/src/bindings/eet_cxx \
 -DTESTS_WD=\"`pwd`\" \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eet_cxx\" \
+-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/src/tests/eet_cxx\" \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eet_cxx\" \
-@CHECK_CFLAGS@ \
-@EET_CFLAGS@
+@CHECK_CFLAGS@ @EET_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EET_CFLAGS@ @EINA_CFLAGS@
 tests_eet_cxx_eet_cxx_suite_LDADD = @CHECK_LIBS@ @USE_EET_LIBS@
 tests_eet_cxx_eet_cxx_suite_DEPENDENCIES = @USE_EET_INTERNAL_LIBS@
 
diff --git a/src/Makefile_Eina_Cxx.am b/src/Makefile_Eina_Cxx.am
index 1e32656..d9887c7 100644
--- a/src/Makefile_Eina_Cxx.am
+++ b/src/Makefile_Eina_Cxx.am
@@ -50,14 +50,12 @@ tests/eina_cxx/eina_cxx_test_optional.cc \
 tests/eina_cxx/eina_cxx_test_value.cc
 
 tests_eina_cxx_eina_cxx_suite_CXXFLAGS = -I$(top_builddir)/src/lib/efl \
--I$(top_builddir)/src/bindings/eina_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
 -DTESTS_WD=\"`pwd`\" \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eina_cxx\" \
 -DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)/src/tests/eina_cxx\" \
--DTESTS_BUILD_DIR=PACKAGE_BUILD_DIR \
+-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eina_cxx\" \
 @CHECK_CFLAGS@ \
-@EINA_CFLAGS@
+@EINA_CXX_CFLAGS@
 tests_eina_cxx_eina_cxx_suite_LDADD = @CHECK_LIBS@ @USE_EINA_LIBS@
 tests_eina_cxx_eina_cxx_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@
 
diff --git a/src/Makefile_Eo_Cxx.am b/src/Makefile_Eo_Cxx.am
index d33c77c..2574ca2 100644
--- a/src/Makefile_Eo_Cxx.am
+++ b/src/Makefile_Eo_Cxx.am
@@ -13,4 +13,5 @@ bindings/eo_cxx/eo_wref.hh \
 bindings/eo_cxx/eo_inherit.hh \
 bindings/eo_cxx/eo_ops.hh \
 bindings/eo_cxx/eo_private.hh \
-bindings/eo_cxx/eo_inherit_bindings.hh
+bindings/eo_cxx/eo_inherit_bindings.hh \
+bindings/eo_cxx/Eo.hh
diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am
index 63e2b95..47578a3 100644
--- a/src/Makefile_Eolian_Cxx.am
+++ b/src/Makefile_Eolian_Cxx.am
@@ -1,8 +1,28 @@
 
+### Library
+
+installed_eoliancxxmainheadersdir = $(includedir)/eolian-cxx-@VMAJ@/
+dist_installed_eoliancxxmainheaders_DATA = \
+lib/eolian_cxx/Eolian_Cxx.hh
+
+installed_eoliancxxheadersdir = $(includedir)/eolian-cxx-@VMAJ@/
+dist_installed_eoliancxxheaders_DATA = \
+lib/eolian_cxx/eo_generate.hh \
+lib/eolian_cxx/eo_types.hh \
+lib/eolian_cxx/eo_validate.hh \
+lib/eolian_cxx/grammar/comment.hh \
+lib/eolian_cxx/grammar/eo_class_constructors_generator.hh \
+lib/eolian_cxx/grammar/eo_class_events.generator.hh \
+lib/eolian_cxx/grammar/eo_class_functions_generator.hh \
+lib/eolian_cxx/grammar/eo_class_generator.hh \
+lib/eolian_cxx/grammar/eo_header_generator.hh \
+lib/eolian_cxx/grammar/inheritance_base_generator.hh \
+lib/eolian_cxx/grammar/parameters_generator.hh \
+lib/eolian_cxx/grammar/tab.hh
+
 ### Binary
 
-bin_PROGRAMS += \
-         bin/eolian_cxx/eolian_cxx
+bin_PROGRAMS += bin/eolian_cxx/eolian_cxx
 
 bin_eolian_cxx_eolian_cxx_SOURCES = \
     bin/eolian_cxx/comments.cc \
@@ -13,40 +33,13 @@ bin_eolian_cxx_eolian_cxx_SOURCES = \
     bin/eolian_cxx/safe_strings.hh \
     bin/eolian_cxx/eolian_cxx.cc
 
-bin_eolian_cxx_eolian_cxx_CFLAGS = \
-       @EOLIAN_CFLAGS@
-
-bin_eolian_cxx_eolian_cxx_CXXFLAGS = \
-       -I$(top_builddir)/src/lib/efl \
-       @EOLIAN_CFLAGS@ \
-       -I$(top_builddir)/src/lib/eo \
-       -I$(top_srcdir)/src/lib/eo \
-       -I$(top_builddir)/src/bindings/eina_cxx \
-       -I$(top_srcdir)/src/bindings/eina_cxx \
-       -I$(top_builddir)/src/lib/eolian_cxx \
-       -I$(top_srcdir)/src/lib/eolian_cxx
+bin_eolian_cxx_eolian_cxx_CXXFLAGS = -I$(top_builddir)/src/lib/efl \
+@CHECK_CFLAGS@ @EINA_CFLAGS@ @EINA_CXX_CFLAGS@ @EO_CFLAGS@ \
+@EOLIAN_CXX_CFLAGS@ @EOLIAN_CFLAGS@
 
-bin_eolian_cxx_eolian_cxx_LDADD = \
-       @USE_EOLIAN_LIBS@
+bin_eolian_cxx_eolian_cxx_LDADD = @CHECK_LIBS@ @USE_EOLIAN_LIBS@
 
-bin_eolian_cxx_eolian_cxx_DEPENDENCIES = \
-       @USE_EOLIAN_INTERNAL_LIBS@
+bin_eolian_cxx_eolian_cxx_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@
 
 include Makefile_Eolian_Cxx_Helper.am
 
-CLEANFILES += $(BUILT_SOURCES)
-
-EXTRA_DIST += \
-       lib/eolian_cxx/Eolian_Cxx.hh \
-       lib/eolian_cxx/eo_generate.hh \
-       lib/eolian_cxx/eo_types.hh \
-       lib/eolian_cxx/eo_validate.hh \
-       lib/eolian_cxx/grammar/comment.hh \
-       lib/eolian_cxx/grammar/eo_class_constructors_generator.hh \
-       lib/eolian_cxx/grammar/eo_class_events.generator.hh \
-       lib/eolian_cxx/grammar/eo_class_functions_generator.hh \
-       lib/eolian_cxx/grammar/eo_class_generator.hh \
-       lib/eolian_cxx/grammar/eo_header_generator.hh \
-       lib/eolian_cxx/grammar/inheritance_base_generator.hh \
-       lib/eolian_cxx/grammar/parameters_generator.hh \
-       lib/eolian_cxx/grammar/tab.hh
diff --git a/src/Makefile_Evas_Cxx.am b/src/Makefile_Evas_Cxx.am
index 5938223..0ee8589 100644
--- a/src/Makefile_Evas_Cxx.am
+++ b/src/Makefile_Evas_Cxx.am
@@ -29,11 +29,11 @@ lib/evas/canvas/evas_box.eo.hh
 
 BUILT_SOURCES += lib/evas/Evas.hh $(generated_evas_canvas_cxx_bindings)
 
-installed_evascanvasmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
-dist_installed_evascanvasmainheaders_DATA = lib/evas/Evas.hh
+installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
+nodist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
 
-installed_evascanvasmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas
-dist_installed_evascanvasmainheaders_DATA = 
$(generated_evas_canvas_cxx_bindings)
+installed_evascxxcanvasheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas
+nodist_installed_evascxxcanvasheaders_DATA = 
$(generated_evas_canvas_cxx_bindings)
 
 lib/evas/Evas.hh:
        @echo -e "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > 
$(top_builddir)/src/lib/evas/Evas.hh
@@ -49,28 +49,13 @@ check_PROGRAMS += tests/evas_cxx/cxx_compile_test
 TESTS += tests/evas_cxx/cxx_compile_test
 
 tests_evas_cxx_cxx_compile_test_SOURCES = tests/evas_cxx/cxx_compile_test.cc
-tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
-I$(top_builddir)/src/lib/efl \
--I$(top_srcdir)/src/lib/edje \
--I$(top_builddir)/src/lib/edje \
--I$(top_srcdir)/src/lib/evas \
--I$(top_builddir)/src/lib/evas \
--I$(top_srcdir)/src/lib/evas/canvas \
--I$(top_builddir)/src/lib/evas/canvas \
--I$(top_srcdir)/src/lib/ecore \
--I$(top_builddir)/src/lib/ecore \
--I$(top_srcdir)/src/lib/eo \
--I$(top_builddir)/src/lib/eo \
--I$(top_srcdir)/src/bindings/eo_cxx \
--I$(top_builddir)/src/bindings/eo_cxx \
--I$(top_srcdir)/src/bindings/ecore_cxx \
--I$(top_builddir)/src/bindings/ecore_cxx \
--I$(top_srcdir)/src/bindings/eina_cxx \
--DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
--DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evas_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@
-tests_evas_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
-tests_evas_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
+tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
+ -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
+ -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evas_cxx\" \
+ @CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ 
@EO_CXX_CFLAGS@ \
+ @ECORE_CFLAGS@ @EINA_CFLAGS@ @EVAS_CFLAGS@ @EO_CFLAGS@
+tests_evas_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_EVAS_LIBS@
+tests_evas_cxx_cxx_compile_test_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
 
 endif
-
 endif
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index c6d1462..45b2b11 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -92,6 +92,27 @@ _guess_classname_from_sources(::options_type& opts)
    return "";
 }
 
+std::pair<std::string, std::string> get_filename_info(std::string path)
+{
+  const size_t last = path.rfind("lib/");
+  if (last != std::string::npos)
+    {
+      path.erase(0, last+4);
+  
+      std::string::iterator slash
+        = std::find(path.begin(), path.end(), '/');
+      if(slash != path.end())
+        {
+          std::string namespace_ (path.begin(), slash);
+          std::string filename (slash+1, path.end());
+          return {filename, namespace_};
+        }
+    }
+  EINA_CXX_DOM_LOG_ERR(::domain)
+    << "Couldn't find source file for class '" << path << "'";
+  return {};
+}
+
 efl::eolian::eo_generator_options
 _resolve_includes(std::string const& classname, ::options_type const& opts)
 {
@@ -101,9 +122,7 @@ _resolve_includes(std::string const& classname, 
::options_type const& opts)
    std::transform(cls_name.begin(), cls_name.end(), cls_name.begin(), 
::tolower);
 
    std::string eo_file = safe_str(eolian_class_file_get(classname.c_str()));
-   const size_t last = eo_file.rfind("/");
-   if (last != std::string::npos) eo_file.erase(0, last+1);
-   gen_opts.c_headers.push_back(eo_file + ".h");
+   gen_opts.c_headers.push_back(get_filename_info(eo_file).first + ".h");
 
    void *cur = NULL;
    const Eina_List *itr, *inheritances = 
eolian_class_inherits_list_get(classname.c_str());
@@ -113,16 +132,17 @@ _resolve_includes(std::string const& classname, 
::options_type const& opts)
         std::string eo_parent_file = safe_str(eolian_class_file_get(ext));
         if (!eo_parent_file.empty())
           {
-             const size_t last = eo_parent_file.rfind("/");
-             if (last != std::string::npos) eo_parent_file.erase(0, last+1);
-             if (eo_parent_file != "eo_base.eo") // we have our own eo_base.hh
+             std::string filename, namespace_;
+             std::tie(filename, namespace_) = 
get_filename_info(eo_parent_file);
+             // we have our own eo_base.hh
+             if (filename != "eo_base.eo" || namespace_ != "eo")
                {
-                  gen_opts.cxx_headers.push_back(eo_parent_file + ".hh");
+                 gen_opts.cxx_headers.push_back(filename + ".hh");
                }
           }
         else
           {
-             EINA_CXX_DOM_LOG_WARN(::domain)
+             EINA_CXX_DOM_LOG_ERR(::domain)
                << "Couldn't find source file for class '" << ext << "'";
           }
      }
diff --git a/src/examples/evas/.gitignore b/src/examples/evas/.gitignore
index 936dd01..daed96b 100644
--- a/src/examples/evas/.gitignore
+++ b/src/examples/evas/.gitignore
@@ -21,3 +21,4 @@
 /evas_3d_md2
 /evas_3d_pick
 /evas_3d_proxy
+/evas_cxx_rectangle
diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am
index 48fac12..e4ffbd6 100644
--- a/src/examples/evas/Makefile.am
+++ b/src/examples/evas/Makefile.am
@@ -205,19 +205,16 @@ evas_aspect_hints_CPPFLAGS = $(EDJE_COMMON_CPPFLAGS)
 evas_aspect_hints_LDADD = $(EDJE_COMMON_LDADD)
 
 EXTRA_PROGRAMS += evas_cxx_rectangle
-evas_cxx_rectangle_SOURCES = \
-evas_cxx_rectangle.cc \
-$(top_builddir)/src/lib/evas/canvas/evas_common_interface.eo.hh \
-$(top_builddir)/src/lib/evas/canvas/evas.eo.hh \
-$(top_builddir)/src/lib/evas/canvas/evas_object.eo.hh \
-$(top_builddir)/src/lib/evas/canvas/evas_image.eo.hh
+evas_cxx_rectangle_SOURCES = evas_cxx_rectangle.cc
 evas_cxx_rectangle_LDADD = $(ECORE_EVAS_COMMON_LDADD)
-evas_cxx_rectangle_CPPFLAGS = \
+evas_cxx_rectangle_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS) \
 -I$(top_srcdir)/src/bindings/eina_cxx \
--I$(top_builddir)/src/bindings/eina_cxx \
 -I$(top_srcdir)/src/bindings/eo_cxx \
+-I$(top_srcdir)/src/bindings/evas_cxx \
+-I$(top_builddir)/src/bindings/eina_cxx \
 -I$(top_builddir)/src/bindings/eo_cxx \
-$(ECORE_EVAS_COMMON_CPPFLAGS)
+-I$(top_builddir)/src/bindings/evas_cxx \
+$(AM_CPPFLAGS) @EVAS_CFLAGS@
 
 EDJS = $(EDCS:%.edc=%.edj)
 

-- 


Reply via email to