From 3317327c234613f4079d889582b07737ff8a9140 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 2 Oct 2024 19:53:47 +0200 Subject: [PATCH] [tests] Fix building the custom-type-assembly assembly from inside a project file. (#21347) Building the custom-type-assembly assembly doesn't work quite right if the RuntimeIdentifier(s) variables are set in the environment from the project file, so don't forward those to the sub-make we execute to build the assembly. This fixes an issue where building monotouch-test would fail locally, because building the custom-type-assembly assembly would fail. Also remove legacy Xamarin logic. --- tests/monotouch-test/dotnet/shared.csproj | 6 +++--- .../custom-type-assembly/Makefile | 17 ++--------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/tests/monotouch-test/dotnet/shared.csproj b/tests/monotouch-test/dotnet/shared.csproj index e72462bc7823..c66a4be6896b 100644 --- a/tests/monotouch-test/dotnet/shared.csproj +++ b/tests/monotouch-test/dotnet/shared.csproj @@ -255,9 +255,9 @@ - - + Condition="!Exists('$(TestLibrariesDirectory)/.libs/dotnet/macos/custom-type-assembly.dll')" > + + diff --git a/tests/test-libraries/custom-type-assembly/Makefile b/tests/test-libraries/custom-type-assembly/Makefile index 29527c3b0295..31af087078fe 100644 --- a/tests/test-libraries/custom-type-assembly/Makefile +++ b/tests/test-libraries/custom-type-assembly/Makefile @@ -2,32 +2,19 @@ TOP=../../.. include $(TOP)/Make.config -.libs/macos/custom-type-assembly.dll: custom-type-assembly.cs Makefile | .libs/macos - $(Q_CSC) $(MAC_mobile_CSC) $< -out:$@ -r:$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/Xamarin.Mac.dll -target:library /nologo - .libs/dotnet/macos/custom-type-assembly.dll: bin/Debug/$(DOTNET_TFM)-macos/custom-type-assembly.dll | .libs/dotnet/macos $(Q) $(CP) $< $@ -.libs/macos .libs/dotnet/macos: +.libs/dotnet/macos: $(Q) mkdir -p $@ bin/Debug/$(DOTNET_TFM)-macos/custom-type-assembly.dll: custom-type-assembly.csproj custom-type-assembly.cs - $(Q) unset MSBUILD_EXE_PATH && $(DOTNET) build $< "/bl:$@.binlog" $(MSBUILD_VERBOSITY) + $(Q) unset MSBUILD_EXE_PATH && $(DOTNET) build $< "/bl:$@.binlog" $(DOTNET_BUILD_VERBOSITY) ifdef INCLUDE_MAC - -ifdef INCLUDE_XAMARIN_LEGACY -TARGETS += \ - .libs/macos/custom-type-assembly.dll \ - -endif - -ifdef ENABLE_DOTNET TARGETS += \ .libs/dotnet/macos/custom-type-assembly.dll \ -endif - endif # INCLUDE_MAC build-assembly: $(TARGETS)