Skip to content

Commit

Permalink
Get the F# binaries from macios-binaries instead of building them eve…
Browse files Browse the repository at this point in the history
…ry time.

It's still possible to build from source if desired.

Also remove the fsharp submodule (it will be cloned manually only if building
from source).
  • Loading branch information
rolfbjarne committed Oct 19, 2018
1 parent 900356c commit 78c77cb
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "external/fsharp"]
path = external/fsharp
url = ../../fsharp/fsharp.git
branch = master
[submodule "external/guiunit"]
path = external/guiunit
url = ../../mono/guiunit.git
Expand Down
1 change: 0 additions & 1 deletion Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ DEVICETV_OBJC_CFLAGS = $(DEVICETV_CFLAGS) $(DEVICE_OBJC_CFLAGS)
# things in other places if they absolutely must.
MONO_PATH=$(TOP)/external/mono
WATCH_MONO_PATH=$(TOP)/external/mono
FSHARP_PATH=$(TOP)/external/fsharp
TOUCH_UNIT_PATH=$(TOP)/external/Touch.Unit
NUNITLITE_PATH=$(TOP)/external/mono/external/nunit-lite
OPENTK_PATH=$(TOP)/external/opentk
Expand Down
1 change: 0 additions & 1 deletion external/fsharp
Submodule fsharp deleted from 717170
2 changes: 1 addition & 1 deletion external/macios-binaries
Submodule macios-binaries updated 31 files
+56 −0 fsharp/License
+ fsharp/lib/release/monotouch/FSharp.Core.dll
+ fsharp/lib/release/monotouch/FSharp.Core.dll.mdb
+ fsharp/lib/release/monotouch/FSharp.Core.optdata
+ fsharp/lib/release/monotouch/FSharp.Core.sigdata
+11,288 −0 fsharp/lib/release/monotouch/FSharp.Core.xml
+56 −0 fsharp/lib/release/monotouch/LICENSE-fsharp
+ fsharp/lib/release/xamarinmacfull/FSharp.Core.dll
+ fsharp/lib/release/xamarinmacfull/FSharp.Core.dll.mdb
+ fsharp/lib/release/xamarinmacfull/FSharp.Core.optdata
+ fsharp/lib/release/xamarinmacfull/FSharp.Core.sigdata
+11,120 −0 fsharp/lib/release/xamarinmacfull/FSharp.Core.xml
+56 −0 fsharp/lib/release/xamarinmacfull/LICENSE-fsharp
+ fsharp/lib/release/xamarinmacmobile/FSharp.Core.dll
+ fsharp/lib/release/xamarinmacmobile/FSharp.Core.dll.mdb
+ fsharp/lib/release/xamarinmacmobile/FSharp.Core.optdata
+ fsharp/lib/release/xamarinmacmobile/FSharp.Core.sigdata
+11,120 −0 fsharp/lib/release/xamarinmacmobile/FSharp.Core.xml
+56 −0 fsharp/lib/release/xamarinmacmobile/LICENSE-fsharp
+ fsharp/lib/release/xamarintvos/FSharp.Core.dll
+ fsharp/lib/release/xamarintvos/FSharp.Core.dll.mdb
+ fsharp/lib/release/xamarintvos/FSharp.Core.optdata
+ fsharp/lib/release/xamarintvos/FSharp.Core.sigdata
+11,288 −0 fsharp/lib/release/xamarintvos/FSharp.Core.xml
+56 −0 fsharp/lib/release/xamarintvos/LICENSE-fsharp
+ fsharp/lib/release/xamarinwatchos/FSharp.Core.dll
+ fsharp/lib/release/xamarinwatchos/FSharp.Core.dll.mdb
+ fsharp/lib/release/xamarinwatchos/FSharp.Core.optdata
+ fsharp/lib/release/xamarinwatchos/FSharp.Core.sigdata
+11,288 −0 fsharp/lib/release/xamarinwatchos/FSharp.Core.xml
+56 −0 fsharp/lib/release/xamarinwatchos/LICENSE-fsharp
2 changes: 2 additions & 0 deletions fsharp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build.stamp
Makefile.inc
fsharp

48 changes: 41 additions & 7 deletions fsharp/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
TOP=..
include $(TOP)/Make.config

FSHARP_FILES:=$(shell git --git-dir=$(FSHARP_PATH)/.git --work-tree=$(FSHARP_PATH) ls-tree --full-tree -r HEAD --name-only | sed 's_^\(.*\)_$(FSHARP_PATH)/\1_' | sed 's/ /\\ /g')
# By default we'll get the F# binaries from the macios-binaries repository.
# It's still possible to build from source, by passing "FSHARP_BUILD_FROM_SOURCE=1" when building,
# which will automatically clone the fsharp repository, and build what's needed.
# The FSHARP_SOURCE_HASH variable below defines which fsharp hash to build.

FSHARP_SOURCE_HASH=7171700877115e2243b4edbc4e2eb88d019e02b0
FSHARP_SOURCE_BRANCH=master

FSHARP_BINARIES_PATH=$(abspath $(MACIOS_BINARIES_PATH)/fsharp)
FSHARP_SOURCE_PATH=$(abspath $(CURDIR)/fsharp)

ifeq ($(FSHARP_BUILD_FROM_SOURCE),)
FSHARP_PATH=$(FSHARP_BINARIES_PATH)
FSHARP_BUILD_PATH=$(FSHARP_BINARIES_PATH)
else
FSHARP_PATH=$(FSHARP_SOURCE_PATH)
FSHARP_BUILD_PATH=build

# Create a list of all the source files in the fsharp repo to use as dependencies.
# But skip any files with spaces, because make + spaces is not a good combination.
Makefile.inc: $(FSHARP_SOURCE_PATH)
$(Q) printf "FSHARP_FILES := \\\\\\n" >> $@.tmp
$(Q) git --git-dir=$(FSHARP_SOURCE_PATH)/.git --work-tree=$(FSHARP_SOURCE_PATH) ls-tree --full-tree -r HEAD --name-only | grep -v ' ' | sed -e 's_^\(.*\)_ $(FSHARP_SOURCE_PATH)/\1 \\_' >> $@.tmp
$(Q) mv $@.tmp $@
-include Makefile.inc
endif

FSHARP_TARGET_FILES = \
FSharp.Core.dll \
Expand All @@ -10,6 +35,11 @@ FSHARP_TARGET_FILES = \
FSharp.Core.sigdata \
FSharp.Core.xml \

$(FSHARP_SOURCE_PATH):
$(Q) echo "Cloning the fsharp repository..."
$(Q) git clone -q https://github.com/fsharp/fsharp fsharp
$(Q) cd fsharp && git checkout $(FSHARP_SOURCE_BRANCH) && git reset --hard $(FSHARP_SOURCE_HASH)

BIN_DIR=$(FSHARP_PATH)/lib/release
IOS_BIN_DIR = $(FSHARP_PATH)/lib/release/monotouch
WATCH_BIN_DIR = $(FSHARP_PATH)/lib/release/xamarinwatchos
Expand All @@ -33,7 +63,7 @@ IOS_FSHARP_DIRECTORIES = \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/LICENSE-fsharp: $(FSHARP_PATH)/LICENSE | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/%.dll: build/monotouch/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/%.dll: $(FSHARP_BUILD_PATH)/monotouch/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/%: $(IOS_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1
Expand All @@ -42,7 +72,7 @@ $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/%: $(IOS_BIN_DIR)/% | $(IOS_DESTD
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/LICENSE-fsharp: $(FSHARP_PATH)/LICENSE | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/%.dll: build/monotouch/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/%.dll: $(FSHARP_BUILD_PATH)/monotouch/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/%: $(IOS_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS
Expand All @@ -62,7 +92,7 @@ WATCH_FSHARP_DIRECTORIES = \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/LICENSE-fsharp: $(FSHARP_PATH)/LICENSE | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/%.dll: build/xamarinwatchos/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/%.dll: $(FSHARP_BUILD_PATH)/xamarinwatchos/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/%: $(WATCH_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS
Expand All @@ -82,7 +112,7 @@ TVOS_FSHARP_DIRECTORIES = \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/LICENSE-fsharp: $(FSHARP_PATH)/LICENSE | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/%.dll: build/xamarintvos/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/%.dll: $(FSHARP_BUILD_PATH)/xamarintvos/%.dll | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS
$(Q) install -m 0644 $< $@

$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/%: $(TVOS_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS
Expand All @@ -107,7 +137,7 @@ MAC_FSHARP_DIRECTORIES = \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/LICENSE-fsharp: $(FSHARP_PATH)/LICENSE | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5
$(Q) install -m 0644 $< $@

$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/%.dll: build/xamarinmacfull/%.dll | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/%.dll: $(FSHARP_BUILD_PATH)/xamarinmacfull/%.dll | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5
$(Q) install -m 0644 $< $@

$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/%: $(MAC_45_BIN_DIR)/% | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5
Expand All @@ -118,7 +148,7 @@ $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/%: $(MAC_45_BIN_DIR)/% |
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/LICENSE-fsharp: $(FSHARP_PATH)/LICENSE | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac
$(Q) install -m 0644 $< $@

$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/%.dll: build/xamarinmacmobile/%.dll | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/%.dll: $(FSHARP_BUILD_PATH)/xamarinmacmobile/%.dll | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac
$(Q) install -m 0644 $< $@

$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/%: $(MAC_MOBILE_BIN_DIR)/% | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac
Expand Down Expand Up @@ -163,11 +193,15 @@ build.stamp: $(FSHARP_FILES) $(FSHARP_PATH)/Makefile
$(MAKE) -C $(FSHARP_PATH)/src/fsharp $(FSHARP_BUILD_TARGETS)
$(Q) touch $@

ifneq ($(FSHARP_BUILD_FROM_SOURCE),)
$(FSHARP_TARGETS): build.stamp
endif

all-local:: $(FSHARP_TARGETS)
install-local:: $(FSHARP_TARGETS)

$(FSHARP_PATH)/autogen.sh: $(FSHARP_SOURCE_PATH)

$(FSHARP_PATH)/Makefile: $(FSHARP_PATH)/autogen.sh $(FSHARP_FILES) /Library/Frameworks/Mono.framework/Versions/Current/updateinfo
@echo "Executing autogen for fsharp..."
$(Q) cd $(FSHARP_PATH) && ./autogen.sh --prefix=/Library/Frameworks/Mono.framework/Versions/Current
Expand Down
4 changes: 0 additions & 4 deletions mk/versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ endef

$(shell rm -f .check-versions-failure)
$(eval $(call CheckSubmoduleTemplate,mono,MONO))
$(eval $(call CheckSubmoduleTemplate,fsharp,FSHARP))
$(eval $(call CheckSubmoduleTemplate,Touch.Unit,TOUCH_UNIT))
$(eval $(call CheckSubmoduleTemplate,opentk,OPENTK))
$(eval $(call CheckSubmoduleTemplate,Xamarin.MacDev,XAMARIN_MACDEV))
Expand All @@ -81,9 +80,6 @@ include $(TOP)/mk/xamarin.mk
reset-mono::
$(Q) rm -f $(TOP)/.stamp-build* $(MONO_PATH)/configure

reset-fsharp::
$(Q) cd $(FSHARP_PATH) && git clean -xffdq

check-versions::
@if test -e .check-versions-failure; then \
rm .check-versions-failure; \
Expand Down

1 comment on commit 78c77cb

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins job (on internal Jenkins) succeeded

Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
Generator Diff (no change)
Test run succeeded

Please sign in to comment.