diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-05-22 19:09:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 19:09:44 +0300 |
commit | 29741a40cbdbe2cf137a28dccbae2012ffb96258 (patch) | |
tree | 8d15b37d29c19e520af6e61a2c84b0d4172798dc /mcs/class/Makefile | |
parent | a796ce400d0ca52b0cb4ca1dbdbed2aa3b1a05b6 (diff) |
[bcl] Make monolite platform specific (#4910)
mscorlib.dll etc will be platform specific in the future. This also
means that we need to adapt monolite since it'll become platform
specific once we start the divergence.
monolite is essentially a repackaging of the "build" profile which
means we need to turn that profile into multi-platform profile
like net_4_x. We'll still have a symlink from build -> build-darwin
and the monolite which is downloaded or packaged in the tarball
is expanded into mcs/lib/monolite-<platform> depending on the platform
you're building on.
I had to move the get-monolite-latest target from the top-level
Makefile.am into mcs/class/Makefile so it has access to HOST_PLATFORM,
but it arguably should've been there anyway before.
Diffstat (limited to 'mcs/class/Makefile')
-rw-r--r-- | mcs/class/Makefile | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/mcs/class/Makefile b/mcs/class/Makefile index a9610f239c3..eb3b7b09ce2 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -381,8 +381,7 @@ DISTFILES = \ MicrosoftAjaxLibrary/License.htm \ test-helpers/NetworkHelpers.cs \ test-helpers/SocketResponder.cs \ - lib/$(monolite_dir)/mcs.exe \ - $(monolite_files) + $(foreach HOST_PLATFORM,darwin linux win32,lib/$(monolite_dir)/mcs.exe $(monolite_files)) .PHONY: all-local $(STD_TARGETS:=-local) all-local $(STD_TARGETS:=-local): @@ -390,7 +389,7 @@ all-local $(STD_TARGETS:=-local): all-local-aot: -monolite_dir := monolite/$(MONO_CORLIB_VERSION) +monolite_dir = monolite-$(HOST_PLATFORM)/$(MONO_CORLIB_VERSION) # Files needed to bootstrap C# compiler build_files = mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \ @@ -413,24 +412,42 @@ lib/$(monolite_dir)/Facades: $(monolite_files): | lib/$(monolite_dir) $(monolite_files): | lib/$(monolite_dir)/Facades -$(monolite_files): lib/$(monolite_dir)/%: lib/build/% +$(monolite_files): lib/$(monolite_dir)/%: lib/build-$(HOST_PLATFORM)/% cp -p $< $@ lib/$(monolite_dir)/mcs.exe: $(MAKE) -C ../mcs PROFILE=build - cp -p lib/build/mcs.exe lib/$(monolite_dir) + cp -p lib/build-$(HOST_PLATFORM)/mcs.exe lib/$(monolite_dir) -$(build_files:%=lib/build/%): +$(build_files:%=lib/build-$(HOST_PLATFORM)/%): cd $(topdir) && $(MAKE) profile-do--build--all NO_DIR_CHECK=1 SKIP_AOT=1 dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe +dist-monolite-all-platforms: + $(MAKE) dist-monolite HOST_PLATFORM=darwin + $(MAKE) dist-monolite HOST_PLATFORM=linux + $(MAKE) dist-monolite HOST_PLATFORM=win32 + package-monolite-latest: - MONOLITE=monolite-$(MONO_CORLIB_VERSION)-latest; \ + MONOLITE=monolite-$(HOST_PLATFORM)-$(MONO_CORLIB_VERSION)-latest; \ $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \ tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/ -dist-default: dist-monolite +package-monolite-latest-all-platforms: + $(MAKE) package-monolite-latest HOST_PLATFORM=darwin + $(MAKE) package-monolite-latest HOST_PLATFORM=linux + $(MAKE) package-monolite-latest HOST_PLATFORM=win32 + +monolite_url = https://download.mono-project.com/monolite/monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest.tar.gz + +get-monolite-latest: + -rm -fr lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION) + -mkdir -p lib/monolite-$(BUILD_PLATFORM) + cd lib && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; } + cd lib && mv -f monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION) + +dist-default: dist-monolite-all-platforms dist-local: dist-default |