From ff9293827f0770d9af54b2008a74fde6e083d383 Mon Sep 17 00:00:00 2001 From: Felipe Magno de Almeida Date: Mon, 11 Dec 2017 12:06:54 -0200 Subject: [PATCH] efl-mono: Fix automake files in C# binding search with buggy mono version --- src/Makefile_Efl_Mono.am | 25 ++++++++++++++++--------- src/examples/efl_mono/Makefile.am | 31 +++++++++++++++++++++---------- src/tests/efl_mono/mono_test_driver.sh | 2 +- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 7b90e18..adbf893 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -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 "" > $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo "" >> $@ + +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) diff --git a/src/examples/efl_mono/Makefile.am b/src/examples/efl_mono/Makefile.am index 6bae1d9..12c379e 100644 --- a/src/examples/efl_mono/Makefile.am +++ b/src/examples/efl_mono/Makefile.am @@ -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 "" > $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo "" >> $@ 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 $@ diff --git a/src/tests/efl_mono/mono_test_driver.sh b/src/tests/efl_mono/mono_test_driver.sh index 56e3f12..e8e8772 100755 --- a/src/tests/efl_mono/mono_test_driver.sh +++ b/src/tests/efl_mono/mono_test_driver.sh @@ -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 -- 2.7.4