From 3174e94a178c41cae0a51fa296e52f711957c14a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 20 Nov 2020 14:41:03 +0100 Subject: [PATCH] [mlaunch] Adjust build logic to ship mlaunch with the .NET nugets when we're building mlaunch as well. (#10122) The original implementation only worked when we used mlaunch from the macios-binaries repository. --- tools/mlaunch/Makefile | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/tools/mlaunch/Makefile b/tools/mlaunch/Makefile index dae4459688..fda4f2ba7e 100644 --- a/tools/mlaunch/Makefile +++ b/tools/mlaunch/Makefile @@ -14,19 +14,28 @@ endif DOTNET_PLATFORMS_MOBILE=$(filter-out macOS,$(DOTNET_PLATFORMS)) ifdef ENABLE_MLAUNCH -all-local install-local clean-local:: - $(MAKE) -C $(MACCORE_PATH)/tools/mlaunch $@ +build-and-install: + $(MAKE) -C $(MACCORE_PATH)/tools/mlaunch all -j8 + $(MAKE) -C $(MACCORE_PATH)/tools/mlaunch install -j8 else -all-local install-local:: +build-and-install: $(Q) $(CP) -R $(MACIOS_BINARIES_PATH)/mlaunch/bin/mlaunch $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin $(Q) $(CP) -R $(MACIOS_BINARIES_PATH)/mlaunch/lib/mlaunch $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib -ifdef ENABLE_DOTNET -all-local install-local:: - $(Q) for platform in $(DOTNET_PLATFORMS_MOBILE); do \ - $(CP) -R $(MACIOS_BINARIES_PATH)/mlaunch/bin/mlaunch $(DOTNET_DESTDIR)/Microsoft.$$platform.Sdk/tools/bin; \ - $(CP) -R $(MACIOS_BINARIES_PATH)/mlaunch/lib/mlaunch $(DOTNET_DESTDIR)/Microsoft.$$platform.Sdk/tools/lib; \ - done endif + +all-local:: build-and-install + +ifdef ENABLE_MLAUNCH +clean-local:: + $(MAKE) -C $(MACCORE_PATH)/tools/mlaunch $@ +endif + +ifdef ENABLE_DOTNET +all-local:: build-and-install + $(Q) for platform in $(DOTNET_PLATFORMS_MOBILE); do \ + $(CP) -R $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch $(DOTNET_DESTDIR)/Microsoft.$$platform.Sdk/tools/bin; \ + $(CP) -R $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mlaunch $(DOTNET_DESTDIR)/Microsoft.$$platform.Sdk/tools/lib; \ + done endif ifdef ENABLE_XAMARIN