This commit is contained in:
Rolf Bjarne Kvinge 2016-04-21 13:56:47 +02:00
Родитель 014e09d6c7
Коммит acf75cd75c
7 изменённых файлов: 187 добавлений и 1 удалений

4
.gitmodules поставляемый
Просмотреть файл

@ -6,3 +6,7 @@
path = external/mono
url = git://github.com/mono/mono.git
branch = mono-4.5.0-branch
[submodule "external/fsharp"]
path = external/fsharp
url = git@github.com:fsharp/fsharp.git
branch = master

Просмотреть файл

@ -213,6 +213,7 @@ DEVICETV_OBJC_CFLAGS = $(DEVICETV_CFLAGS) $(DEVICE_OBJC_CFLAGS)
# things in other places if they absolutely must.
MONO_PATH=$(TOP)/external/mono
LLVM_PATH=$(TOP)/external/llvm
FSHARP_PATH=$(TOP)/external/fsharp
MONO_PREFIX ?= /Library/Frameworks/Mono.framework/Versions/Current
SYSTEM_MCS=$(MONO_PREFIX)/bin/mcs

Просмотреть файл

@ -1,5 +1,5 @@
TOP=.
SUBDIRS=builds
SUBDIRS=builds fsharp
include $(TOP)/Make.config
include $(TOP)/mk/versions.mk

1
external/fsharp поставляемый Submodule

@ -0,0 +1 @@
Subproject commit 7171700877115e2243b4edbc4e2eb88d019e02b0

2
fsharp/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,2 @@
build.stamp

174
fsharp/Makefile Normal file
Просмотреть файл

@ -0,0 +1,174 @@
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')
FSHARP_TARGET_FILES = \
FSharp.Core.dll \
FSharp.Core.dll.mdb \
FSharp.Core.optdata \
FSharp.Core.sigdata \
FSharp.Core.xml \
BIN_DIR=$(FSHARP_PATH)/lib/release
IOS_BIN_DIR = $(FSHARP_PATH)/lib/release/monotouch
WATCH_BIN_DIR = $(FSHARP_PATH)/lib/release/xamarinwatchos
TVOS_BIN_DIR = $(FSHARP_PATH)/lib/release/xamarintvos
MAC_MOBILE_BIN_DIR = $(FSHARP_PATH)/lib/release/xamarinmacmobile
MAC_45_BIN_DIR = $(FSHARP_PATH)/lib/release/xamarinmacfull
# Xamarin.iOS
IOS_FSHARP_TARGETS = \
$(foreach file,$(FSHARP_TARGET_FILES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/$(file)) \
$(foreach file,$(FSHARP_TARGET_FILES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/$(file)) \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/LICENSE-fsharp \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/LICENSE-fsharp \
IOS_FSHARP_DIRECTORIES = \
build/monotouch \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1 \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS \
$(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
$(Q) install -m 0644 $< $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/%: $(IOS_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1
$(Q) install -m 0644 $< $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/%: | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS
$(Q_LN) ln -fs ../2.1/$* $@
# Xamarin.WatchOS
WATCH_FSHARP_TARGETS = \
$(foreach file,$(FSHARP_TARGET_FILES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/$(file)) \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/LICENSE-fsharp \
WATCH_FSHARP_DIRECTORIES = \
build/xamarinwatchos \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS \
$(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
$(Q) install -m 0644 $< $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS/%: $(WATCH_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS
$(Q) install -m 0644 $< $@
# Xamarin.TVOS
TVOS_FSHARP_TARGETS = \
$(foreach file,$(FSHARP_TARGET_FILES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/$(file)) \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/LICENSE-fsharp \
TVOS_FSHARP_DIRECTORIES = \
build/xamarintvos \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS \
$(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
$(Q) install -m 0644 $< $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS/%: $(TVOS_BIN_DIR)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS
$(Q) install -m 0644 $< $@
# Xamarin.Mac
MAC_FSHARP_TARGETS = \
$(foreach file,$(FSHARP_TARGET_FILES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/$(file)) \
$(foreach file,$(FSHARP_TARGET_FILES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/$(file)) \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/LICENSE-fsharp \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/LICENSE-fsharp \
MAC_FSHARP_DIRECTORIES = \
build/xamarinmacfull \
build/xamarinmacmobile \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5 \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac \
## XM full
$(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
$(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
$(Q) install -m 0644 $< $@
## XM mobile
$(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
$(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
$(Q) install -m 0644 $< $@
# Common
ifdef INCLUDE_IOS
FSHARP_TARGETS += $(IOS_FSHARP_TARGETS)
FSHARP_DIRECTORIES += $(IOS_FSHARP_DIRECTORIES)
FSHARP_BUILD_TARGETS += only-monotouch
ifdef INCLUDE_WATCH
FSHARP_TARGETS += $(WATCH_FSHARP_TARGETS)
FSHARP_DIRECTORIES += $(WATCH_FSHARP_DIRECTORIES)
FSHARP_BUILD_TARGETS += only-xamarinwatchos
endif
ifdef INCLUDE_TVOS
FSHARP_TARGETS += $(TVOS_FSHARP_TARGETS)
FSHARP_DIRECTORIES += $(TVOS_FSHARP_DIRECTORIES)
FSHARP_BUILD_TARGETS += only-xamarintvos
endif
endif
ifdef INCLUDE_MAC
FSHARP_TARGETS += $(MAC_FSHARP_TARGETS)
FSHARP_DIRECTORIES += $(MAC_FSHARP_DIRECTORIES)
FSHARP_BUILD_TARGETS += only-xamarinmac
endif
$(FSHARP_DIRECTORIES):
$(Q) mkdir -p $@
### Sign the assemblies. This is done in a temporary directory so that we don't have to re-sign on every install.
build/%.dll: $(BIN_DIR)/%.dll | build/monotouch build/xamarinmacmobile build/xamarinmacfull build/xamarinwatchos build/xamarintvos
$(Q) cp $< $@
$(Q_SN) MONO_CFG_DIR="$(TOP)" sn -q -R "$@" "$(PRODUCT_KEY_PATH)"
build.stamp: export XBUILD_FRAMEWORK_FOLDERS_PATH=$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks
build.stamp: export MSBuildExtensionsPath=$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild
build.stamp: $(FSHARP_FILES) $(FSHARP_PATH)/Makefile
$(MAKE) -C $(FSHARP_PATH)/src/fsharp build-proto
$(MAKE) -C $(FSHARP_PATH)/src/fsharp $(FSHARP_BUILD_TARGETS)
$(Q) touch $@
$(FSHARP_TARGETS): build.stamp
all-local:: $(FSHARP_TARGETS)
install-local:: $(FSHARP_TARGETS)
$(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
@echo "Executed autogen for fsharp"
clean-local::
git clean -xfd
cd $(FSHARP_PATH) && git clean -xfd
include $(TOP)/mk/rules.mk

Просмотреть файл

@ -59,6 +59,7 @@ endef
$(shell rm -f .check-versions-failure)
$(eval $(call CheckSubmoduleTemplate,llvm,LLVM))
$(eval $(call CheckSubmoduleTemplate,mono,MONO))
$(eval $(call CheckSubmoduleTemplate,fsharp,FSHARP))
# some hackish reset-* targets to deal with what needs to happen in various parts of the build tree when you reset a module
@ -68,6 +69,9 @@ reset-mono::
reset-llvm::
$(Q) $(MAKE) -C $(TOP)/builds clean-llvm
reset-fsharp::
$(Q) cd $(FSHARP_PATH) && git clean -xffdq
check-versions::
@if test -e .check-versions-failure; then \
rm .check-versions-failure; \