efl-mono: Fix automake files in C# binding search with buggy mono version
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Mon, 11 Dec 2017 14:06:54 +0000 (12:06 -0200)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Mon, 11 Dec 2017 16:45:57 +0000 (14:45 -0200)
src/Makefile_Efl_Mono.am
src/examples/efl_mono/Makefile.am
src/tests/efl_mono/mono_test_driver.sh

index 7b90e18..adbf893 100644 (file)
@@ -180,8 +180,8 @@ lib_efl_mono_libefl_mono_dll_SOURCES = \
        $(efl_eldbus_mono_files) \
        $(efl_ecore_evas_mono_files)
 
-lib/efl_mono/libefl_mono.dll$(EXEEXT): $(lib_efl_mono_libefl_mono_dll_SOURCES) lib/efl_mono/$(am__dirstamp) $(efl_eolian_mono_files)
-       @rm -f lib/efl_mono/libefl_mono.dll$(EXEEXT)
+lib/efl_mono/libefl_mono.dll: $(lib_efl_mono_libefl_mono_dll_SOURCES) lib/efl_mono/$(am__dirstamp) $(efl_eolian_mono_files) lib/efl_mono/libefl_mono.dll.config
+       @rm -f lib/efl_mono/libefl_mono.dll
        $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -out:$@ -t:library $(filter %.cs, $(^))
 
 ### MSBuild
@@ -319,9 +319,9 @@ tests/efl_mono/libefl_mono_native_test.c: tests/efl_mono/test_testing.eo.h tests
 efl_mono_test_eolian_mono_files = tests/efl_mono/test_testing.eo.cs \
 tests/efl_mono/test_numberwrapper.eo.cs
 
-tests/efl_mono/libefl_mono_test.dll$(EXEEXT): $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll$(EXEEXT) tests/efl_mono/libefl_mono_native_test.la
-       @rm -f tests/efl_mono/libefl_mono_test.dll$(EXEEXT)
-       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll$(EXEEXT) -out:$@ -t:library $(filter %.cs, $(^))
+tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la
+       @rm -f tests/efl_mono/libefl_mono_test.dll
+       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll -out:$@ -t:library $(filter %.cs, $(^))
 
 # C Sharp test executable
 AM_TESTS_ENVIRONMENT += MONO='mono'; export MONO;
@@ -332,7 +332,6 @@ AM_TESTS_ENVIRONMENT += PATH='$(PATH):$(TEST_PATHS):$(WIN_ADD_TEST_PATHS)'; expo
 else
 AM_TESTS_ENVIRONMENT += LD_LIBRARY_PATH='$(LD_LIBRARY_PATH):$(TEST_PATHS)'; export LD_LIBRARY_PATH;
 endif
-AM_TESTS_ENVIRONMENT += EXEEXT='$(EXEEXT)'; export EXEEXT;
 
 check_PROGRAMS += tests/efl_mono/efl_mono.exe
 TESTS += tests/efl_mono/mono_test_driver.sh
@@ -351,9 +350,17 @@ tests_efl_mono_efl_mono_exe_SOURCES = \
      tests/efl_mono/Value.cs \
      tests/efl_mono/ValueEolian.cs
 
-tests/efl_mono/efl_mono.exe$(EXEEXT): $(tests_efl_mono_efl_mono_exe_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll$(EXEEXT) tests/efl_mono/libefl_mono_test.dll$(EXEEXT)
-       @rm -f tests/efl_mono/efl_mono_exe$(EXEEXT)
-       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll$(EXEEXT) -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll$(EXEEXT) -out:$@ $(filter %.cs, $(^))
+lib/efl_mono/libefl_mono.dll.config:
+       echo "<configuration>" > $@
+       echo "  <dllmap dll=\"eina\" target=\"/home/felipe/dev/samsung/upstream/efl/build/src/lib/eina/.libs/libeina.so\"/>" >> $@
+       echo "  <dllmap dll=\"eo\" target=\"/home/felipe/dev/samsung/upstream/efl/build/src/lib/eo/.libs/libeo.so\"/>" >> $@
+       echo "  <dllmap dll=\"evas\" target=\"/home/felipe/dev/samsung/upstream/efl/build/src/lib/evas/.libs/libevas.so\"/>" >> $@
+       echo "  <dllmap dll=\"elementary\" target=\"/home/felipe/dev/samsung/upstream/efl/build/src/lib/elementary/.libs/libelementary.so\"/>" >> $@
+       echo "</configuration>" >> $@
+
+tests/efl_mono/efl_mono.exe: $(tests_efl_mono_efl_mono_exe_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_test.dll
+       @rm -f tests/efl_mono/efl_mono_exe
+       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^))
 
 # Rule for generating the .cs files
 tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP)
index 6bae1d9..12c379e 100644 (file)
@@ -47,14 +47,16 @@ endif
 
 example_numberwrapper.c: example_numberwrapper.eo.h example_numberwrapper.eo.c
 
-numberwrapper_lib_name = example_numberwrapper.out
+noinst_lib_LTLIBRARIES = libexample_numberwrapper.la
+noinst_libdir = $(abs_top_builddir)
 
-$(numberwrapper_lib_name): example_numberwrapper.c
-       $(CC) -shared -o $@ $< -DEFL_BETA_API_SUPPORT -I. $(COMMON_FLAGS)
+libexample_numberwrapper_la_SOURCES = example_numberwrapper.c
+libexample_numberwrapper_la_LDFLAGS = -shared
+libexample_numberwrapper_la_CFLAGS = $(COMMON_FLAGS) -DEFL_BETA_API_SUPPORT
 
 SRCS += example_numberwrapper.c
 EXTRA_FILES += example_numberwrapper.eo
-GENERATED += example_numberwrapper.eo.h example_numberwrapper.eo.c $(numberwrapper_lib_name)
+GENERATED += example_numberwrapper.eo.h example_numberwrapper.eo.c EoInherit01.exe.config
 
 # CSharp examples
 
@@ -68,24 +70,33 @@ FunctionPointer01.exe
 
 example_numberwrapper.eo.cs: example_numberwrapper.eo
        $(AM_V_EOLMONO) \
-       $(EOLIAN_MONO) $(EOLIAN_FLAGS) $(EOLIAN_MONO_FLAGS) --dllimport $(numberwrapper_lib_name) -o $@ -r $(top_builddir)/src/bindings/mono/efl_mono/efl_libs.csv $<
+       $(EOLIAN_MONO) $(EOLIAN_FLAGS) $(EOLIAN_MONO_FLAGS) --dllimport example_numberwrapper -o $@ -r $(top_builddir)/src/bindings/mono/efl_mono/efl_libs.csv $<
 
 EoInherit01_exe_SOURCES = EoInherit01.cs
 EoInherit01_srcs = $(EoInherit01_exe_SOURCES) example_numberwrapper.eo.cs
-EoInherit01.exe$(EXEEXT): $(EoInherit01_srcs) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll$(EXEEXT) $(numberwrapper_lib_name)
+EoInherit01.exe: $(EoInherit01_srcs) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll libexample_numberwrapper.la EoInherit01.exe.config
        @rm -f $@
-       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll$(EXEEXT) -out:$@ $(filter %.cs, $(^))
+       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
 
 $(abs_top_builddir)/EoInherit01.csproj: $(EoInherit01_srcs) $(am_dirstamp) $(numberwrapper_lib_name)
        @rm -f $@
        $(EFL_MONO_MSBUILD_GEN) $(MSBUILD_GEN_FLAGS) -o $@ -a EoInherit01.exe -r libefl_mono.dll -t exe $(patsubst %.cs,src/examples/efl_mono/%.cs,$(filter %.cs, $(^)))
-
+EoInherit01.exe.config:
+       echo "<configuration>" > $@
+       echo "  <dllmap dll=\"example_numberwrapper\" target=\"$(abs_top_builddir)/src/examples/efl_mono/.libs/libexample_numberwrapper.so\"/>" >> $@
+       echo "  <dllmap dll=\"efl_mono\" target=\"$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll\"/>" >> $@
+       echo "  <runtime>" >> $@
+       echo "    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">" >> $@
+       echo "      <probing privatePath=\"/home/felipe/dev/samsung/upstream/efl/build/src/lib/efl_mono\" />" >> $@
+       echo "    </assemblyBinding>" >> $@
+       echo "  </runtime>" >> $@
+       echo "</configuration>" >> $@
 
 FunctionPointer01_exe_SOURCES = FunctionPointer01.cs
 FunctionPointer01_srcs = $(FunctionPointer01_exe_SOURCES) example_numberwrapper.eo.cs
-FunctionPointer01.exe$(EXEEXT): $(FunctionPointer01_srcs) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll$(EXEEXT) $(numberwrapper_lib_name)
+FunctionPointer01.exe: $(FunctionPointer01_srcs) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll $(numberwrapper_lib_name)
        @rm -f $@
-       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll$(EXEEXT) -out:$@ $(filter %.cs, $(^))
+       $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^))
 
 $(abs_top_builddir)/FunctionPointer01.csproj: $(FunctionPointer01_srcs) $(am_dirstamp) $(numberwrapper_lib_name)
        @rm -f $@
index 56e3f12..e8e8772 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
 echo $LD_LIBRARY_PATH
-EINA_LOG_LEVEL=8 MONO_LOG_LEVEL=debug $MONO $MONO_BUILDPATH/src/tests/efl_mono/efl_mono.exe$EXEEXT
+EINA_LOG_LEVEL=8 MONO_LOG_LEVEL=debug $MONO $MONO_BUILDPATH/src/tests/efl_mono/efl_mono.exe