From 1cacd6e44508ef208c3420daf392dd1dd23c5843 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 11 Sep 2018 10:18:39 -0500 Subject: [PATCH 1/2] [build] remove remaining $XA_INTEGRATION variables Context: https://github.com/xamarin/java.interop/pull/368 Addressing the comments in #368, this removes more unused build targets, etc. --- Makefile | 16 +++------------- src/Java.Interop/Java.Interop.csproj | 2 -- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index b3ff7979e..810bd86ce 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,6 @@ NATIVE_EXT = .so DLLMAP_OS_NAME = linux endif -XA_CONFIGURATION = Debug - GENDARME_URL = https://github.com/downloads/spouliot/gendarme/gendarme-2.10-bin.zip PACKAGES = \ @@ -26,9 +24,6 @@ PREPARE_EXTERNAL_FILES = \ DEPENDENCIES = \ bin/Test$(CONFIGURATION)/libNativeTiming$(NATIVE_EXT) -XA_INTEGRATION_OUTPUTS = \ - bin/$(XA_CONFIGURATION)/Java.Interop.dll - TESTS = \ bin/Test$(CONFIGURATION)/Java.Interop-Tests.dll \ bin/Test$(CONFIGURATION)/Java.Interop.Dynamic-Tests.dll \ @@ -50,9 +45,7 @@ NUNIT_CONSOLE = packages/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe BUILD_PROPS = bin/Build$(CONFIGURATION)/JdkInfo.props bin/Build$(CONFIGURATION)/MonoInfo.props all: $(BUILD_PROPS) src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config \ - $(PACKAGES) $(DEPENDENCIES) $(TESTS) $(XA_INTEGRATION_OUTPUTS) - -xa-all: $(PACKAGES) $(XA_INTEGRATION_OUTPUTS) + $(PACKAGES) $(DEPENDENCIES) $(TESTS) run-all-tests: run-tests run-test-jnimarshal run-test-generator-core run-ptests @@ -95,9 +88,6 @@ src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config: src/Java.Runti bin/Build$(CONFIGURATION)/JdkInfo.props sed -e 's#@JI_JVM_PATH@#$(JI_JVM_PATH)#g' -e 's#@OS_NAME@#$(DLLMAP_OS_NAME)#g' -e $(JAVA_RUNTIME_ENVIRONMENT_DLLMAP_OVERRIDE_CMD) < $< > $@ -xa-fxcop: lib/gendarme-2.10/gendarme.exe bin/$(XA_CONFIGURATION)/Java.Interop.dll - $(RUNTIME) $< --html xa-gendarme.html $(if @(GENDARME_XML),--xml xa-gendarme.xml) --ignore gendarme-ignore.txt bin/$(XA_CONFIGURATION)/Java.Interop.dll - fxcop: lib/gendarme-2.10/gendarme.exe bin/GendarmeDebug/Java.Interop.dll cp src/Java.Interop/obj/Gendarme/Java.Interop.dll.mdb bin/GendarmeDebug/ $(RUNTIME) $< --html gendarme.html $(if @(GENDARME_XML),--xml gendarme.xml) --ignore gendarme-ignore.txt bin/GendarmeDebug/Java.Interop.dll @@ -142,8 +132,8 @@ bin/Test$(CONFIGURATION)/Android.Interop-Tests.dll: $(wildcard src/Android.Inter $(MSBUILD) $(MSBUILD_FLAGS) touch $@ -bin/$(XA_CONFIGURATION)/Java.Interop.dll: $(wildcard src/Java.Interop/*/*.cs) src/Java.Interop/Java.Interop.csproj - $(MSBUILD) $(if $(V),/v:diag,) /p:Configuration=$(XA_CONFIGURATION) $(if $(SNK),"/p:AssemblyOriginatorKeyFile=$(SNK)",) +bin/$(CONFIGURATION)/Java.Interop.dll: $(wildcard src/Java.Interop/*/*.cs) src/Java.Interop/Java.Interop.csproj + $(MSBUILD) $(if $(V),/v:diag,) /p:Configuration=$(CONFIGURATION) $(if $(SNK),"/p:AssemblyOriginatorKeyFile=$(SNK)",) bin/GendarmeDebug/Java.Interop.dll: $(wildcard src/Java.Interop/*/*.cs) src/Java.Interop/Java.Interop.csproj $(MSBUILD) $(if $(V),/v:diag,) /p:Configuration="Gendarme" $(if $(SNK),"/p:AssemblyOriginatorKeyFile=$(SNK)",) /p:CscToolExe=`which mcs` src/Java.Interop/Java.Interop.csproj diff --git a/src/Java.Interop/Java.Interop.csproj b/src/Java.Interop/Java.Interop.csproj index 4306ebd16..026fad6ee 100644 --- a/src/Java.Interop/Java.Interop.csproj +++ b/src/Java.Interop/Java.Interop.csproj @@ -93,8 +93,6 @@ - - From e3020c70cd3cbeb295096c6b5cd105a2bb002a28 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 11 Sep 2018 22:04:29 -0500 Subject: [PATCH 2/2] [build] fixes for $(Configuration)=Gendarme I'm not exactly sure how this was working before: - Gendarme config had no way to import `JdkInfo.props` - Thus usage of `$(JavaCPath)` was using an empty string? --- Configuration.props | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Configuration.props b/Configuration.props index e7c9e4acb..85a3fc2c1 100644 --- a/Configuration.props +++ b/Configuration.props @@ -1,21 +1,26 @@ + + <_Configuration Condition=" '$(Configuration)' != 'Gendarme' ">$(Configuration) + <_Configuration Condition=" '$(Configuration)' == 'Gendarme' ">Debug + <_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(_Configuration)\ + $(MSBuildThisFileDirectory)external\cecil - $(MSBuildThisFileDirectory)bin\$(Configuration)\ + $(MSBuildThisFileDirectory)bin\$(_Configuration)\ $(MSBuildThisFileDirectory)external\xamarin-android-tools