Skip to content

Commit

Permalink
[mlaunch] Adjust build logic to ship mlaunch with the .NET nugets whe…
Browse files Browse the repository at this point in the history
…n we're building mlaunch as well. (dotnet#10122)

The original implementation only worked when we used mlaunch from the
macios-binaries repository.
  • Loading branch information
rolfbjarne authored Nov 20, 2020
1 parent d7bb2f2 commit 3174e94
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions tools/mlaunch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,29 @@ 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
endif

all-local:: build-and-install

ifdef ENABLE_MLAUNCH
clean-local::
$(MAKE) -C $(MACCORE_PATH)/tools/mlaunch $@
endif

ifdef ENABLE_DOTNET
all-local install-local::
all-local:: build-and-install
$(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; \
$(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
endif

ifdef ENABLE_XAMARIN
MACCORE_HASH:=$(shell cd $(MACCORE_PATH) && git log -1 --pretty=%h)
Expand Down

0 comments on commit 3174e94

Please sign in to comment.