xamarin-macios/builds/Makefile

1719 строки
80 KiB
Makefile
Исходник Обычный вид История

2016-04-21 14:18:44 +03:00
TOP=..
include $(TOP)/Make.config
PREFIX=$(abspath $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/)
download: downloads/$(basename $(MONO_FILENAME))
downloads/$(MONO_FILENAME):
$(Q) mkdir -p downloads
$(Q) echo "Downloading $(MONO_URL)..."
$(Q) curl -f -L $(if $(V),-v,-s) $(MONO_URL) --output $@.tmp
$(Q) mv $@.tmp $@
$(Q) echo "Downloaded $(MONO_URL)"
downloads/$(basename $(MONO_FILENAME)): downloads/$(MONO_FILENAME)
$(Q) echo "Unzipping $(MONO_FILENAME)..."
$(Q) rm -Rf $@.tmp
$(Q) unzip -q -d $@.tmp $<
$(Q) mv $@.tmp $@
$(Q) echo "Unzipped $(MONO_FILENAME)"
clean-locals::
$(Q) rm -Rf downloads
.stamp-download-%: downloads/$(basename $(MONO_FILENAME))
$(Q) touch $@
ifeq ($(MONO_BUILD_FROM_SOURCE),)
all-local:: download
endif
2016-04-21 14:18:44 +03:00
IPHONESIMULATOR_SDK=$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk
IPHONESIMULATOR_PREFIX=$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk/usr
IPHONEOS_SDK=$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphoneos.sdk
IPHONEOS_PREFIX=$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphoneos.sdk/usr
ifdef ENABLE_XAMARIN
XAMARIN_AUTOGEN_FLAGS=--enable-extension-module=xamarin
XAMARIN_IOS_CONFIGURE_FLAGS=--enable-extension-module=xamarin
XAMARIN_MAC_CONFIGURE_FLAGS=--enable-extension-module=xamarin --enable-extension-module
-include $(MACCORE_PATH)/builds/Makefile.include
2016-04-21 14:18:44 +03:00
endif
ifndef DISABLE_STRIP
INSTALL_STRIP_FLAG=-s
endif
ifndef ENABLE_XI_BTLS
XAMARIN_IOS_CONFIGURE_FLAGS += --disable-btls
endif
ifndef ENABLE_XM_BTLS
XAMARIN_MAC_CONFIGURE_FLAGS += --disable-btls
endif
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
# this is a list of all the files from mono we care about, so that we
# can use that list as dependencies for our makefile targets
-include .deps.mono.mk
.deps.mono.mk: $(TOP)/.git/modules/external/mono/HEAD
$(Q) printf 'MONO_DEPENDENCIES += Makefile \\\n' > $@.tmp
$(Q) cd $(MONO_PATH) && git ls-files --recurse-submodules 'mcs/class/*.cs' 'mcs/build/*.cs' 'external/*.cs' '*.h' '*.c' '*.cpp' | grep -v "/Test/" | sed 's/ /\\ /g' | sed 's@^\(.*\)$$@ $(MONO_PATH)/\1 \\@' >> $(abspath $@).tmp
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) mv $@.tmp $@
# ld: weak import of symbol '_fstatat' not supported because of option: -no_weak_imports for architecture x86_64
# according to 'man fstatat' it appeared in OS X 10.10 (iOS 8)
# so disable 'fstatat' by setting using ac_cv_func_fstatat=no
# ld: weak import of symbol '_readlinkat' not supported because of option: -no_weak_imports for architecture x86_64
# according to 'man readlinkat' it appeared in OS X 10.10 (iOS 8)
# so disable 'readlinkat' by setting using ac_cv_func_readlinkat=no
# these can be removed when our min ios/osx version (at runtime) is macOS 10.10+ or iOS 8+
# ld: weak import of symbol '_futimens' not supported because of option: -no_weak_imports for architecture x86_64
# ld: weak import of symbol '_utimensat' not supported because of option: -no_weak_imports for architecture x86_64
# headers say these methods were introduced in 10.13:
# usr/include/sys/stat.h:int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
# int utimensat(int __fd, const char *__path, const struct timespec __times[2], int __flag) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
# so disable 'futimens' and 'utimensat'
COMMON_ACVARS = \
ac_cv_func_fstatat=no \
ac_cv_func_readlinkat=no \
ac_cv_func_futimens=no \
ac_cv_func_utimensat=no \
COMMON_LDFLAGS=-Wl,-no_weak_imports
2016-04-21 14:18:44 +03:00
BITCODE_CFLAGS=-fexceptions
BITCODE_LDFLAGS=-framework CoreFoundation -lobjc -lc++
BITCODE_CONFIGURE_FLAGS=--enable-llvm-runtime --with-bitcode=yes
ifdef ENABLE_BITCODE_ON_IOS
IOS_BITCODE_CFLAGS=$(BITCODE_CFLAGS) -fembed-bitcode-marker
IOS_BITCODE_CXXFLAGS=$(BITCODE_CFLAGS) -fembed-bitcode-marker
IOS_BITCODE_LDFLAGS=$(BITCODE_LDFLAGS)
IOS_BITCODE_CONFIGURE_FLAGS=$(BITCODE_CONFIGURE_FLAGS)
endif
#
# The install-* targets should not depend on any of the build-* targets,
# because it will slow down the install targets unnecessarily (the build-*
# targets will recurse into multiple directories, which would be wasteful
# since in most cases the build has already been done)
#
# Currently 'make install' takes about 4 seconds (without running any build-*
# targets)
#
# This means that 'make all install' will not work in this directory, it must
# be 'make all && make install'.
#
# This turns off the clang: warning: argument unused during compilation
# warnings when using clang+ccache together
CCACHE_CFLAGS=-Qunused-arguments
CCACHE_CXXFLAGS=-Qunused-arguments
#
# Configuration for the mono sdk makefiles
#
SDK_CONFIG=$(MONO_PATH)/sdks/Make.config
SDK_ARGS= \
XCODE_DIR=$(XCODE_DEVELOPER_ROOT) XCODE32_DIR=$(XCODE94_DEVELOPER_ROOT) \
IOS_VERSION=$(IOS_SDK_VERSION) IOS_VERSION_MIN=$(MIN_IOS_SDK_VERSION) \
TVOS_VERSION=$(TVOS_SDK_VERSION) TVOS_VERSION_MIN=$(MIN_TVOS_SDK_VERSION) \
WATCHOS_VERSION=$(WATCH_SDK_VERSION) WATCHOS_VERSION_MIN=$(MIN_WATCHOS_SDK_VERSION) \
IGNORE_PROVISION_LLVM=1
Bump to mono:2018-06 (#4277) * Bump to mono:2018-06 * Bump mono * Updates compression to work with the public span * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Bump Mono * [runtime] always use `mono_jit_set_aot_mode` (#4491) `mono_jit_set_aot_only` is deprecated and accidentally broke with https://github.com/mono/mono/pull/7887 This should fix device tests with `mono-2018-06` * Testing with Zoltan's patch * Include libmono-system-native on Xamarin.Mac * Bump Mono Commit list for mono/mono: * mono/mono@7bcda192a06 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804) * mono/mono@23e95ec7ad7 Apply F# portable pdb debug fix for pinvokes & bump (#9797) * mono/mono@295f6d32afd [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696) Diff: https://github.com/mono/mono/compare/7d5f4b61366008d47665bb473205f4ae1f716d1f...7bcda192a06267562af565d404c06d159f475c03 * Revert 4bacab3d5c7fa86a0e6437f64bb9f08ea3d0741b, it doesn't fix the ios aot problems. * Bump mono * [tests] Adjust the MT0137 test for mcs change in behavior. Starting with mono 5.16 mcs will now add assembly references when the assembly is only used in attributes (this was already the case for csc in both 5.14 and 5.16, so it seems to be a compatibility change). Adjust the MT0137 test accordingly. * [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message. Fixes this test: 1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException ColumnNumber Expected: 2 But was: 0 * Bump mono * [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that. * Bump mono * Bump mono * [jenkins] Don't give VSTS a fake branch. (#4667) Something in VSTS changed, and now fake branch names don't work anymore. So instead use real branch names (and for pull requests I've created a 'pull-request' branch we can use). * Assembly.LoadFile accepts only absolute path * [linker] Add new Facade (System.Threading.Tasks.Extensions). Fixes these MTouch test failures: 1. Xamarin.Linker.SdkTest.iOS_Unified : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 2. Xamarin.Linker.SdkTest.tvOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 3. Xamarin.Linker.SdkTest.watchOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > * [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732) * Bump Mono * [mtouch] add mixed-mode support (#4751) * [mtouch] add --interp-mixed option When enabling this option, mtouch will AOT compile `mscorlib.dll`. At runtime that means every method that wasn't AOT'd will be executed by the runtime interpreter. * [mtouch] Add support to --interpreter to list the assemblies to (not) interpret. * [msbuild] Simplify interpreter code to use a single variable. * Fix whitespace. * [mtouch] Move mtouch-specific code to mtouch-specific file. * [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property. * [mtouch] Add sanity check for aot-compiling interpreted assemblies. * Bump Mono * [linker] Updates SDKs facades list * Bump mono * [msbuild] Adds facades which might override default nuget version to framework list The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs * Bump to a VSfM version that can build XM Classic projects.
2018-10-10 18:02:28 +03:00
ifdef DISABLE_DOWNLOAD_LLVM
SDK_ARGS += DISABLE_DOWNLOAD_LLVM=1
endif
SDK_BUILDDIR = $(MONO_PATH)/sdks/builds
SDK_DESTDIR = $(abspath $(MONO_PATH)/sdks/out)
$(MONO_PATH)/sdks/Make.config:
echo "DISABLE_ANDROID=1" > $@
2016-04-21 14:18:44 +03:00
##
## Xamarin.Mac
##
# We only build the mono runtimes here (mac32 and mac64)
# The xammac classlibs are built as a part of the 'tools64' build.
MAC_ASSEMBLY_NAMES = \
I18N \
I18N.CJK \
I18N.MidEast \
I18N.Other \
I18N.Rare \
I18N.West \
mscorlib \
Microsoft.CSharp \
Mono.CompilerServices.SymbolWriter \
Mono.Data.Sqlite \
Mono.Data.Tds \
Mono.Security \
System.ComponentModel.Composition \
System.ComponentModel.DataAnnotations \
System.Core \
System.Data.Services.Client \
System.Data \
System.IdentityModel \
2016-04-21 14:18:44 +03:00
System.IO.Compression.FileSystem \
System.IO.Compression \
System.Json \
System.Net.Http \
System.Net \
System.Numerics \
System.Runtime.Serialization \
System.ServiceModel.Web \
System.ServiceModel \
System.ServiceModel.Internals \
System.Transactions \
System.Web.Services \
System.Windows \
System.Xml.Linq \
System.Xml.Serialization \
System.Xml \
System \
System.Security \
System.Reflection.Context \
System.Net.Http.WinHttpHandler \
System.Numerics.Vectors
2016-04-21 14:18:44 +03:00
FACADE_SUBDIRS_MK = $(MONO_PATH)/mcs/class/Facades/subdirs.make
# File does not exist before checking out mono
-include $(FACADE_SUBDIRS_MK)
MAC_FACADE_ASSEMBLY_NAMES = $(xammac_PARALLEL_SUBDIRS) $(xammac_SUBDIRS)
2016-04-21 14:18:44 +03:00
MAC_4_5_ADDITIONAL_ASSEMBLY_NAMES = \
Mono.Messaging \
Mono.Posix \
System.Configuration \
System.Configuration.Install \
System.Data.Linq \
System.EnterpriseServices \
System.IdentityModel.Selectors \
System.Messaging \
System.Runtime.Serialization.Formatters.Soap
2016-04-21 14:18:44 +03:00
MAC_4_5_ASSEMBLY_NAMES = $(MAC_ASSEMBLY_NAMES) $(MAC_4_5_ADDITIONAL_ASSEMBLY_NAMES)
MAC_4_5_FACADE_ASSEMBLY_NAMES = $(xammac_net_4_5_PARALLEL_SUBDIRS) $(xammac_net_4_5_SUBDIRS)
2016-04-21 14:18:44 +03:00
2016-12-21 12:36:17 +03:00
MAC_ASSEMBLIES = $(MAC_ASSEMBLY_NAMES)
MAC_FACADE_ASSEMBLIES = $(MAC_FACADE_ASSEMBLY_NAMES)
MAC_NO_MDB_ASSEMBLIES = System.Windows System.Xml.Serialization
MAC_4_5_ASSEMBLIES = $(MAC_4_5_ASSEMBLY_NAMES)
MAC_4_5_FACADE_ASSEMBLIES = $(MAC_4_5_FACADE_ASSEMBLY_NAMES)
2016-04-21 14:18:44 +03:00
MAC_DIRECTORIES = \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/Facades \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5 \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/Facades \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/pkgconfig \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/include \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/assemblies/System \
MAC_BCL_TARGETS = \
2016-12-21 12:36:17 +03:00
$(foreach file,$(MAC_ASSEMBLIES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/$(file).dll) \
$(foreach file,$(filter-out $(MAC_NO_MDB_ASSEMBLIES),$(MAC_ASSEMBLIES)),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/$(file).pdb) \
$(foreach file,$(MAC_FACADE_ASSEMBLIES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/Xamarin.Mac/Facades/$(file).dll) \
$(foreach file,$(MAC_4_5_ASSEMBLIES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/$(file).dll) \
$(foreach file,$(filter-out $(MAC_NO_MDB_ASSEMBLIES),$(MAC_4_5_ASSEMBLIES)),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/$(file).pdb) \
$(foreach file,$(MAC_4_5_FACADE_ASSEMBLIES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/Facades/$(file).dll) \
2016-04-21 14:18:44 +03:00
MAC_TARGETS = \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-profiler-log.a \
2018-10-15 22:39:29 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-native-compat.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-native-unified.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-native-compat.dylib \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-2.0.dylib \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-2.0.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/pkgconfig/mono-2.pc \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/assemblies/System/System.config \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin/bmac-mobile-mono \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin/bmac-mobile-mono-32 \
2016-04-21 14:18:44 +03:00
$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current \
$(MAC_DIRECTORIES) \
# $(3): specific xcode path
2016-04-21 14:18:44 +03:00
define MacBuildTemplate
$(2)_CPPFLAGS = \
-isysroot $(5) \
2016-04-21 14:18:44 +03:00
-mmacosx-version-min=$(MIN_OSX_SDK_VERSION)
$(2)_CFLAGS = -O2 -arch $(1)
$(2)_CXXFLAGS = -O2 -arch $(1)
$(2)_LDFLAGS = $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
$(2)_CONFIGURE_FLAGS = \
--prefix=$$(BUILD_DESTDIR)/$(2) \
--host=$(1)-apple-darwin10 \
--cache-file=../$(2).config.cache \
--enable-maintainer-mode \
--with-glib=embedded \
--with-mcs-docs=no \
--disable-nls \
--disable-iconv \
--disable-mcs-build \
--disable-boehm \
$(XAMARIN_MAC_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
$(2)_ACVARS = $(COMMON_ACVARS)
2016-04-21 14:18:44 +03:00
$(2)_CONFIGURE_ENVIRONMENT = \
$$($(2)_ACVARS) \
2016-04-21 14:18:44 +03:00
PATH="$(MONO_PREFIX)/bin:$(PATH)" \
CPPFLAGS="$$($(2)_CPPFLAGS)" \
CFLAGS="$$($(2)_CFLAGS)" \
CXXFLAGS="$$($(2)_CXXFLAGS)" \
LDFLAGS="$$($(2)_LDFLAGS)" \
CC="$(MAC$(4)_CC)" \
CXX="$(MAC$(4)_CXX)" \
DEVELOPER_DIR="$(3)" \
2016-04-21 14:18:44 +03:00
setup:: setup-$(2)
setup-$(2): .stamp-configure-$(2)
.stamp-configure-$(2): $(MONO_PATH)/configure
$(Q) $$($(2)_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh $(2) $(abspath $(MONO_PATH)/configure) $$($(2)_CONFIGURE_FLAGS)
$(BUILD_DESTDIR)/mono-$(2): mono-wrapper.in .stamp-configure-$(2) | $(BUILD_DESTDIR)
$$(Q_GEN) sed < $$< > $$@ 's|@ARCH@|$(1)|g; s|@MONO@|$(realpath .)/$(2)/mono/mini/mono|g; s|@FRAMEWORK_ROOT@|$(abspath $(MAC_DESTDIR)/$$(MAC_FRAMEWORK_CURRENT_DIR))|g'
$$(Q) chmod +x $$@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
.stamp-build-$(2): .stamp-configure-$(2) $(BUILD_DESTDIR)/mono-$(2) $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
PATH="$(MONO_PREFIX)/bin:$(PATH)" $(MAKE) -C $(2)/mono
PATH="$(MONO_PREFIX)/bin:$(PATH)" $(MAKE) -C $(2)/mono install
PATH="$(MONO_PREFIX)/bin:$(PATH)" $(MAKE) -C $(2)/support
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $$@
build-$(2): .stamp-build-$(2)
2016-04-21 14:18:44 +03:00
endef
$(eval $(call MacBuildTemplate,i386,mac32,$(XCODE94_DEVELOPER_ROOT),32,$(XCODE94_MAC_SDKROOT)))
$(eval $(call MacBuildTemplate,x86_64,mac64,$(XCODE_DEVELOPER_ROOT),,$(XCODE_MAC_SDKROOT)))
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(MONO_PATH)/mcs/class/lib/%: .stamp-build-tools64; @true
2016-04-21 14:18:44 +03:00
define MacInstallBclTemplate
MAC_DIRECTORIES += \
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$$(BUILD_DESTDIR)/bcl/$(2)/Facades \
$$(BUILD_DESTDIR)/bcl/$(2) \
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$$(MAC_DESTDIR)$$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/$(1)/%: $$(BUILD_DESTDIR)/bcl/$(2)/% | $$(MAC_DESTDIR)$$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/$(1)/Facades
2016-04-21 14:18:44 +03:00
$$(Q) install -m 0755 $$< $$@
$$(MAC_DESTDIR)$$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/$(1)/%.pdb: $$(BUILD_DESTDIR)/mac/$(2)/bcl/%.pdb | $$(MAC_DESTDIR)$$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/$(1)/Facades
$$(Q) install -m 0644 $$< $$@
2016-04-21 14:18:44 +03:00
endef
$(eval $(call MacInstallBclTemplate,Xamarin.Mac,xammac))
$(eval $(call MacInstallBclTemplate,4.5,xammac_net_4_5))
$(MAC_DIRECTORIES) $(BUILD_DESTDIR):
$(Q) mkdir -p $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
mac-facade-check: $(MAC_BCL_TARGETS)
2016-04-21 14:18:44 +03:00
$(Q) rm -f .$@*
$(Q) echo $(MAC_4_5_FACADE_ASSEMBLIES) | tr ' ' '\n' | sort > .$@1
2016-12-21 12:36:17 +03:00
$(Q) ls -1 $(MONO_PATH)/mcs/class/lib/xammac_net_4_5/Facades | grep dll$$ | sed 's/[.]dll//' | sort > .$@2
2016-04-21 14:18:44 +03:00
$(Q) if ! diff -u .$@1 .$@2; then echo "\n*** There are Facade assemblies in "$(MONO_PATH)/mcs/class/lib/xammac_net_4_5/Facades " not defined in "$(FACADE_SUBDIRS_MK)" ***\n"; exit 1; fi
$(Q) rm -f .$@*
define lipo_template_static
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/$1: mac32/$(2)/.libs/$(1) mac64/$(2)/.libs/$(1) | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib
$(QT_LIPO) lipo -create $$+ -output $$@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
mac32/$(2)/.libs/$(1): .stamp-build-mac32
mac64/$(2)/.libs/$(1): .stamp-build-mac64
2016-04-21 14:18:44 +03:00
MAC_TARGETS += $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/$1
endef
define lipo_template_dynamic
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/$1: mac32/$(2)/.libs/$(1) mac64/$(2)/.libs/$(1) | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib
$(QT_LIPO) lipo -create $$+ -output $$@
$(Q) install_name_tool -id @rpath/$1 $$@
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
mac32/$(2)/.libs/$(1): .stamp-build-mac32
mac64/$(2)/.libs/$(1): .stamp-build-mac64
2016-04-21 14:18:44 +03:00
MAC_TARGETS += $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/$1
endef
$(eval $(call lipo_template_static,libmono-profiler-log.a,mono/profiler))
$(eval $(call lipo_template_static,libmonosgen-2.0.a,mono/mini))
$(eval $(call lipo_template_dynamic,libmonosgen-2.0.dylib,mono/mini))
$(eval $(call lipo_template_dynamic,libMonoPosixHelper.dylib,support))
2018-10-15 22:39:29 +03:00
$(eval $(call lipo_template_static,libmono-native-compat.a,mono/native))
$(eval $(call lipo_template_static,libmono-native-unified.a,mono/native))
$(eval $(call lipo_template_dynamic,libmono-native-compat.dylib,mono/native))
$(eval $(call lipo_template_dynamic,libmono-native-unified.dylib,mono/native))
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
mac32/data/mono-2.pc: .stamp-build-mac32
install/mac64/bin/mono-sgen: .stamp-build-mac64
install/mac32/bin/mono-sgen: .stamp-build-mac32
2016-04-21 14:18:44 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-2.0.dylib $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-2.0.a: | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib
$(Q_LN) ln -sf libmonosgen-2.0$(suffix $@) $@
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/pkgconfig/mono-2.pc: mac32/data/mono-2.pc | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/pkgconfig
$(Q_CP) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/assemblies/System/System.config: mac-System.config | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/assemblies/System
$(Q_CP) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin/bmac-mobile-mono: install/mac64/bin/mono-sgen | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin
$(Q) install -m 0755 $< $@
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin/bmac-mobile-mono-32: install/mac32/bin/mono-sgen | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/bin
$(Q) install -m 0755 $< $@
2016-04-21 14:18:44 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_DIR)/Versions/Current:
$(Q_LN) ln -hfs $(MAC_INSTALL_VERSION) $(MAC_DESTDIR)$(MAC_FRAMEWORK_DIR)/Versions/Current
build:: build-mac
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
build-mac: $(MAC_TARGETS)
2016-04-21 14:18:44 +03:00
install-local:: install-mac
install-mac: $(MAC_TARGETS)
clean-local:: clean-mac
clean-mac: clean-mac32 clean-mac64
clean-mac32:
rm -rf mac32 .stamp-configure-mac32 mac32.config.cache
clean-mac64:
rm -rf mac64 .stamp-configure-mac64 mac64.config.cache
##
## Xamarin.iOS
##
all-local:: build
ifdef INCLUDE_IOS
all-local:: $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/smcs
endif
setup::
ifdef INCLUDE_IOS
install-local:: $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/smcs
endif
clean-local::
@rm -rf $(BUILD_DESTDIR) .stamp-configure-*
@rm -f $(MONO_PATH)/configure
ifdef DISABLE_BUILDS_MAKEFILE_DEP
BUILDS_MAKEFILE_DEP =
else
BUILDS_MAKEFILE_DEP = Makefile
endif
# SDK builds need to depend on this since they are executed by recursive make executions
$(MONO_PATH)/configure: $(MONO_PATH)/configure.ac $(BUILDS_MAKEFILE_DEP)
2016-04-21 14:18:44 +03:00
$(Q) ./wrap-autogen.sh $(MONO_PATH) mono $(XAMARIN_AUTOGEN_FLAGS)
configure-mono:
rm -f $(MONO_PATH)/configure
$(MAKE) $(MONO_PATH)/configure
# FIXME: Needed because of broken MonoDevelop assumptions
$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/smcs:
@mkdir -p $(dir $@)
@echo Installing smcs script
@echo "#!/bin/bash" > $@
@echo >> $@
@echo 'SMCS=`which mcs`' >> $@
@echo 'if test -z $$SMCS; then' >> $@
@echo " SMCS=/Library/Frameworks/Mono.framework/Versions/Current/bin/mcs" >> $@
@echo "fi" >> $@
@echo 'unset MONO_PATH' >> $@
@echo "\$$SMCS -nostdlib -r:$(abspath $(IOS_TARGETDIR)/$(MONOTOUCH_PREFIX)/lib/mono/2.1/mscorlib.dll) -r:$(abspath $(IOS_TARGETDIR)/$(MONOTOUCH_PREFIX)/lib/mono/2.1/System.dll) \"\$$@\"" >> $@
@chmod +x $@
#
# Tools 64bit build. Builds all the class libs as well.
#
TOOLS64_CFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
TOOLS64_CXXFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
TOOLS64_LDFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
TOOLS64_CONFIGURE_FLAGS= --build=x86_64-apple-darwin10 \
--with-monotouch_tv=yes \
--with-monotouch_watch=yes \
2016-04-21 14:18:44 +03:00
--prefix=$(BUILD_DESTDIR)/tools64 \
--enable-maintainer-mode \
--cache-file=../tools64.config.cache \
--with-glib=embedded \
--enable-minimal=com \
2016-10-28 16:21:30 +03:00
--with-profile4_x=no \
2016-04-21 14:18:44 +03:00
--with-monotouch=yes \
--with-xammac=yes \
--with-mcs-docs=no \
--disable-nls \
--disable-iconv \
--disable-boehm \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
TOOLS64_ACVARS = $(COMMON_ACVARS)
2016-04-21 14:18:44 +03:00
TOOLS64_CONFIGURE_ENVIRONMENT = \
$(TOOLS64_ACVARS) \
2016-04-21 14:18:44 +03:00
CFLAGS="$(TOOLS64_CFLAGS)" \
CXXFLAGS="$(TOOLS64_CXXFLAGS)" \
LDFLAGS="$(TOOLS64_LDFLAGS)" \
DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) \
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
tools:: build-tools64 install-tools
setup:: setup-tools64
build:: build-tools64
clean-local:: clean-tools64
tools64: build-tools64 install-tools
ifdef INCLUDE_IOS
install-local:: install-tools-ios
install-tools:: install-tools-ios
endif
install-local:: install-tools-mac
install-tools:: install-tools-mac
setup-tools64: .stamp-configure-tools64
.stamp-configure-tools64: $(MONO_PATH)/configure
$(Q) $(TOOLS64_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh tools64 $(abspath $(MONO_PATH)/configure) $(TOOLS64_CONFIGURE_FLAGS)
build-tools-bcl: build-tools64
build-tools: build-tools64
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
.stamp-build-tools64: .stamp-configure-tools64 $(MONO_DEPENDENCIES)
$(MAKE) -C tools64 all EXTERNAL_MCS=$(SYSTEM_CSC) EXTERNAL_RUNTIME=$(SYSTEM_MONO) MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) XAMMAC_MCS_FLAGS=$(MAC_CSC_FLAGS)
2016-04-21 14:18:44 +03:00
# NO_INSTALL is defined in mono/mcs/build/profiles except for net_4_5. If we don't have it, then it attempts to install into a gac, and sometimes fail
NO_INSTALL=1 $(MAKE) -C tools64 -j 1 install EXTERNAL_MCS=$(SYSTEM_CSC) EXTERNAL_RUNTIME=$(SYSTEM_MONO)
2016-04-21 14:18:44 +03:00
@touch .stamp-build-tools64
clean-tools64:
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
rm -rf tools64 .stamp-*-tools64 tools64.config.cache
2016-04-21 14:18:44 +03:00
rm -f .stamp-build-tools64
ifdef INCLUDE_WATCH
install-local:: install-tools-watch
install-tools:: install-tools-watch
endif
ifdef INCLUDE_TVOS
install-local:: install-tools-tvos
2016-05-16 12:04:22 +03:00
install-tools:: install-tools-tvos
endif
2016-04-21 14:18:44 +03:00
#
# Xamarin.iOS/WatchOS/TVOS BCL assemblies
#
# note: Mono.Cairo is probably used for Android only (removed from xtouch list)
IOS_ASSEMBLIES = I18N.CJK I18N.MidEast I18N.Other I18N.Rare I18N.West I18N Mono.Data.Sqlite Mono.Data.Tds Mono.Security mscorlib \
System System.Core System.Data System.Data.Services.Client System.Json System.Runtime.Serialization \
System.ServiceModel.Web System.ServiceModel System.Transactions System.Web.Services System.Xml.Linq System.Xml \
System.ServiceModel.Internals \
System.Numerics System.IdentityModel System.IO.Compression System.IO.Compression.FileSystem \
2016-04-21 14:18:44 +03:00
System.ComponentModel.DataAnnotations System.ComponentModel.Composition \
System.Net.Http.WinHttpHandler \
[Do not merge yet] Update to mono 2017-04 branch (#1960) * Update to mono 2017-04 branch * Patch from Zoltan to fix build error with CppSharp.CppParser.dll * Include new linker files in Makefile, based on mareks commit * [msbuild] Fix running bgen for Xamarin.Mac. bgen must be executed with the system mono, not bmac-mobile-mono, and without the MONO_PATH variable set. * System.Data tests should act as if they are running on mobile profile * Add --runtime=mobile to mono flags in Modern * Move runtime launcher options up * System.Data tests should use Mobile profile (mac fix) * Bump 2017-04 to pick up AOT and assembly resolution fixes * Build fixes for netstandard.dll and System.Drawing.Primitives.dll The new handling went in with https://github.com/mono/mono/pull/4501. I also noticed that WatchOS was missing a target for System.Drawing.Primitives.dll, so I added that. * Add netstandard.dll to 2.1/Facades and System.Drawing.Primitives.dll to WatchOS * Fix 2.1/Facades/netstandard.dll build * Fix the netstandard targets * Bump mono to latest 2017-04 commit * [xharness] Fix adding defines to csproj by correctly detecting existing defines. * Bump mono to latest 2017-04 commit * [mtouch] Update csproj with new files. * [mtouch] Improve reporting for MarkExceptions from the linker. * Bump mono to latest 2017-04 commit * Bump mono to pick up latest 2017-04 branch commit (Fixes #55436) Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55436 * Add a missing Makefile dependency * Chris Hamons patch to apply --runtime=mobile as necessary at AOT time (It is currently being applied for some configurations at runtime only) * Bump system mono * Bump mono for assembly loader changes * Bump system mono * Update assemblies list as some where moved to facades https://github.com/mono/mono/commit/6ca5ec442b494bed8cfb44258c1c73c091ba3122 https://github.com/mono/mono/commit/c38e4d9220b16488e6f8f9e1f05aed4a8af16e62 * Bump mono to latest 2017-04 commit * Add another new facade * Bump mono to tip of 2017-04. * Bump mono to tip of 2017-04. * [tests][mtouch] Adjust tests to cope with fewer assemblies being included in linked apps. Fixes #56307 and #56308. System.dll is now completely linked away unless the app actually uses any System.dll API. This is the change that caused this to change: https://github.com/mono/mono/commit/4960d5d2a28a08476ee4239e1746f04afce41c13 Previously the following types would always be kept by the linker: ``` $ monodis --typedef System.dll Typedef Table 1: (null) (flist=1, mlist=1, flags=0x0, extends=0x0) 2: ObjCRuntime.INativeObject (flist=1, mlist=1, flags=0xa0, extends=0x0) 3: Mono.Net.CFObject (flist=1, mlist=2, flags=0x100000, extends=0x5) 4: Mono.Net.CFArray (flist=4, mlist=19, flags=0x100, extends=0xc) 5: Mono.Net.CFNumber (flist=5, mlist=32, flags=0x100100, extends=0xc) 6: Mono.Net.CFRange (flist=5, mlist=41, flags=0x100108, extends=0x25) 7: Mono.Net.CFString (flist=7, mlist=42, flags=0x100100, extends=0xc) 8: Mono.Net.CFData (flist=8, mlist=53, flags=0x100100, extends=0xc) 9: Mono.Net.CFDictionary (flist=8, mlist=63, flags=0x0, extends=0xc) 10: Mono.Net.CFMutableDictionary (flist=10, mlist=75, flags=0x100100, extends=0x24) 11: Mono.Net.CFUrl (flist=10, mlist=80, flags=0x100100, extends=0xc) 12: Mono.Net.CFRunLoop (flist=10, mlist=83, flags=0x100100, extends=0xc) 13: Mono.Net.CFBoolean (flist=10, mlist=94, flags=0x100, extends=0x5) 14: Mono.AppleTls.SecCertificate (flist=13, mlist=106, flags=0x100100, extends=0x5) 15: Mono.AppleTls.SecIdentity (flist=14, mlist=122, flags=0x100, extends=0x5) 16: Mono.AppleTls.SecIdentity/ImportOptions (flist=19, mlist=134, flags=0x100105, extends=0x5) 17: Mono.AppleTls.SecKey (flist=19, mlist=134, flags=0x100100, extends=0x5) 18: Mono.AppleTls.SecStatusCode (flist=21, mlist=141, flags=0x100, extends=0x69) 19: Mono.AppleTls.SecTrustResult (flist=395, mlist=141, flags=0x100, extends=0x69) 20: Mono.AppleTls.SecImportExport (flist=404, mlist=141, flags=0x100100, extends=0x5) 21: Mono.AppleTls.SecImportExport/<>c (flist=404, mlist=144, flags=0x102103, extends=0x5) 22: Mono.AppleTls.SecPolicy (flist=406, mlist=147, flags=0x100100, extends=0x5) 23: Mono.AppleTls.SecTrust (flist=407, mlist=154, flags=0x100100, extends=0x5) 24: System.Security.Cryptography.OidGroup (flist=408, mlist=174, flags=0x101, extends=0x69) 25: System.Security.Cryptography.Oid (flist=420, mlist=174, flags=0x100101, extends=0x5) 26: System.Security.Cryptography.CAPI (flist=423, mlist=176, flags=0x100180, extends=0x5) 27: System.Security.Cryptography.AsnEncodedData (flist=423, mlist=178, flags=0x100101, extends=0x5) 28: System.Security.Cryptography.X509Certificates.X509Utils (flist=424, mlist=179, flags=0x100100, extends=0x5) 29: System.Security.Cryptography.X509Certificates.PublicKey (flist=424, mlist=181, flags=0x100101, extends=0x5) 30: System.Security.Cryptography.X509Certificates.X509Certificate2 (flist=429, mlist=188, flags=0x102101, extends=0x51) 31: System.Security.Cryptography.X509Certificates.X509Certificate2Impl (flist=431, mlist=204, flags=0x100080, extends=0x55) 32: System.Security.Cryptography.X509Certificates.X509CertificateCollection (flist=431, mlist=209, flags=0x102101, extends=0x6d) 33: System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator (flist=431, mlist=212, flags=0x100102, extends=0x5) 34: System.Security.Cryptography.X509Certificates.X509Helper2 (flist=432, mlist=217, flags=0x100180, extends=0x5) 35: <PrivateImplementationDetails> (flist=432, mlist=218, flags=0x100, extends=0x5) 36: <PrivateImplementationDetails>/__StaticArrayInitTypeSize=9 (flist=433, mlist=219, flags=0x113, extends=0x25) ``` Some of the above types from System.dll implemented ObjCRuntime.INativeObject (from System.dll), which our linker detected as implementing ObjCRuntime.INativeObject (from Xamarin.iOS.dll), so these types were treated as custom NSObject subclasses, and the MarkNSObjects linker step would mark them (which would in turn cause all the other types in the list to be marked). With that change, these types now implement ObjCRuntimeInternal.INativeObject, and the linker does not treat them as custom NSObject subclasses anymore. I think the new behavior is correct: these types do not actually inherit from the real NSObject/INativeObject, so the linker should not treat them as such. This may run into different bugs because the linker might now remove more stuff than before, but that would be a different issue. This means that the fix is to modify these tests accordingly. https://bugzilla.xamarin.com/show_bug.cgi?id=56307 https://bugzilla.xamarin.com/show_bug.cgi?id=56308 * Bump mono to latest. * Fix merge conflict that was missed * [mtouch] Renumber new error which clashes with an existing error number in master.
2017-05-29 19:39:29 +03:00
System.Numerics.Vectors System.Reflection.Context \
System.Security \
2016-11-29 13:36:30 +03:00
System.Windows System.Xml.Serialization System.Net \
Microsoft.CSharp Mono.CSharp
2016-04-21 14:18:44 +03:00
IOS_REPL_ASSEMBLIES = mscorlib System System.Core System.Xml Mono.CSharp
IOS_FACADE_ASSEMBLIES = $(monotouch_PARALLEL_SUBDIRS) $(monotouch_SUBDIRS)
2016-04-21 14:18:44 +03:00
TVOS_ASSEMBLIES = $(IOS_ASSEMBLIES)
WATCHOS_ASSEMBLIES = $(filter-out Mono.Security Mono.Data.Tds,$(IOS_ASSEMBLIES))
2016-04-21 14:18:44 +03:00
TVOS_FACADE_ASSEMBLIES = $(IOS_FACADE_ASSEMBLIES)
WATCHOS_FACADE_ASSEMBLIES = $(IOS_FACADE_ASSEMBLIES)
TVOS_REPL_ASSEMBLIES = $(IOS_REPL_ASSEMBLIES)
WATCHOS_REPL_ASSEMBLIES = $(IOS_REPL_ASSEMBLIES)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
ios-facade-check: $(IOS_BCL_TARGETS)
2016-04-21 14:18:44 +03:00
$(Q) rm -f .$@*
$(Q) echo $(IOS_FACADE_ASSEMBLIES) | tr ' ' '\n' | sort > .$@1
$(Q) ls -1 $(MONO_PATH)/mcs/class/lib/monotouch/Facades | grep dll$$ | sed 's/[.]dll//' | sort > .$@2
2016-04-21 14:18:44 +03:00
$(Q) if ! diff -u .$@1 .$@2; then echo "\n*** There are Facade assemblies in "$(MONO_PATH)/mcs/class/lib/monotouch/Facades" not defined in "$(FACADE_SUBDIRS_MK)"***\n"; exit 1; fi
$(Q) rm -f .$@*
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
watch-facade-check: $(WATCH_BCL_TARGETS)
2016-05-16 12:04:22 +03:00
@true
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
disabled-watch-facade-check: $(WATCH_BCL_TARGETS)
2016-04-21 14:18:44 +03:00
$(Q) rm -f .$@*
$(Q) echo $(WATCHOS_FACADE_ASSEMBLIES) | tr ' ' '\n' | sort > .$@1
$(Q) ls -1 $(MONO_PATH)/mcs/class/lib/monotouch_watch/Facades | grep dll$$ | sed 's/[.]dll//' | sort > .$@2
$(Q) if ! diff -u .$@1 .$@2; then echo "\n*** There are Facade assemblies in "$(MONO_PATH)/mcs/class/lib/monotouch_watch/Facades" not defined in "$(FACADE_SUBDIRS_MK)" ***\n"; exit 1; fi
2016-04-21 14:18:44 +03:00
$(Q) rm -f .$@*
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
tvos-facade-check: $(TVOS_BCL_TARGETS)
2016-04-21 14:18:44 +03:00
$(Q) rm -f .$@*
$(Q) echo $(TVOS_FACADE_ASSEMBLIES) | tr ' ' '\n' | sort > .$@1
$(Q) ls -1 $(MONO_PATH)/mcs/class/lib/monotouch_tv/Facades | grep dll$$ | sed 's/[.]dll//' | sort > .$@2
2016-04-21 14:18:44 +03:00
$(Q) if ! diff -u .$@1 .$@2; then echo "\n*** There are Facade assemblies in "$(MONO_PATH)/mcs/class/lib/monotouch_tv/Facades" not defined in "$(FACADE_SUBDIRS_MK)" ***\n"; exit 1; fi
$(Q) rm -f .$@*
NO_MDB_ASSEMBLIES = System.Windows System.Xml.Serialization
IOS_BCL_TARGETS_DIRS += \
$(PREFIX)/lib/mono/2.1 \
$(PREFIX)/lib/mono/2.1/Facades \
$(PREFIX)/lib/mono/Xamarin.iOS \
$(PREFIX)/lib/mono/Xamarin.iOS/Facades \
2016-04-21 14:18:44 +03:00
$(PREFIX)/lib/mono/2.1/repl \
$(PREFIX)/lib/mono/Xamarin.iOS/repl \
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/bcl/monotouch \
$(BUILD_DESTDIR)/bcl/monotouch/Facades \
$(BUILD_DESTDIR)/bcl/monotouch_runtime \
2016-04-21 14:18:44 +03:00
WATCH_BCL_TARGETS_DIRS += \
$(PREFIX)/lib/mono/Xamarin.WatchOS \
$(PREFIX)/lib/mono/Xamarin.WatchOS/Facades \
$(PREFIX)/lib/mono/Xamarin.WatchOS/repl \
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/bcl/monotouch_watch \
$(BUILD_DESTDIR)/bcl/monotouch_watch/Facades \
$(BUILD_DESTDIR)/bcl/monotouch_watch_runtime \
2016-04-21 14:18:44 +03:00
TVOS_BCL_TARGETS_DIRS += \
$(PREFIX)/lib/mono/Xamarin.TVOS \
$(PREFIX)/lib/mono/Xamarin.TVOS/Facades \
$(PREFIX)/lib/mono/Xamarin.TVOS/repl \
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/bcl/monotouch_tv \
$(BUILD_DESTDIR)/bcl/monotouch_tv/Facades \
$(BUILD_DESTDIR)/bcl/monotouch_tv_runtime \
2016-04-21 14:18:44 +03:00
IOS_BCL_TARGETS += \
$(foreach file,$(IOS_ASSEMBLIES),$(PREFIX)/lib/mono/2.1/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(filter-out $(NO_MDB_ASSEMBLIES),$(IOS_ASSEMBLIES)),$(PREFIX)/lib/mono/2.1/$(file).pdb) \
2016-04-21 14:18:44 +03:00
$(foreach file,$(IOS_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.iOS/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(filter-out $(NO_MDB_ASSEMBLIES),$(IOS_ASSEMBLIES)),$(PREFIX)/lib/mono/Xamarin.iOS/$(file).pdb) \
2016-04-21 14:18:44 +03:00
$(PREFIX)/lib/mono/Xamarin.iOS/mscorlib.dll \
$(PREFIX)/lib/mono/2.1/mscorlib.dll \
$(foreach file,$(IOS_FACADE_ASSEMBLIES),$(PREFIX)/lib/mono/2.1/Facades/$(file).dll) \
$(foreach file,$(IOS_FACADE_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.iOS/Facades/$(file).dll) \
2016-04-21 14:18:44 +03:00
$(foreach file,$(IOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/2.1/repl/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(IOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/2.1/repl/$(file).pdb) \
2016-04-21 14:18:44 +03:00
$(foreach file,$(IOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.iOS/repl/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(IOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.iOS/repl/$(file).pdb) \
2016-04-21 14:18:44 +03:00
WATCH_BCL_TARGETS += \
$(foreach file,$(WATCHOS_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.WatchOS/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(filter-out $(NO_MDB_ASSEMBLIES),$(WATCHOS_ASSEMBLIES)),$(PREFIX)/lib/mono/Xamarin.WatchOS/$(file).pdb) \
2016-04-21 14:18:44 +03:00
$(PREFIX)/lib/mono/Xamarin.WatchOS/mscorlib.dll \
$(foreach file,$(WATCHOS_FACADE_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.WatchOS/Facades/$(file).dll) \
$(foreach file,$(WATCHOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.WatchOS/repl/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(WATCHOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.WatchOS/repl/$(file).pdb) \
2016-04-21 14:18:44 +03:00
TVOS_BCL_TARGETS += \
$(foreach file,$(TVOS_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.TVOS/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(filter-out $(NO_MDB_ASSEMBLIES),$(TVOS_ASSEMBLIES)),$(PREFIX)/lib/mono/Xamarin.TVOS/$(file).pdb) \
2016-04-21 14:18:44 +03:00
$(PREFIX)/lib/mono/Xamarin.TVOS/mscorlib.dll \
$(foreach file,$(TVOS_FACADE_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.TVOS/Facades/$(file).dll) \
$(foreach file,$(TVOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.TVOS/repl/$(file).dll) \
2016-12-21 12:36:17 +03:00
$(foreach file,$(TVOS_REPL_ASSEMBLIES),$(PREFIX)/lib/mono/Xamarin.TVOS/repl/$(file).pdb) \
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/Xamarin.iOS/repl/%: $(BUILD_DESTDIR)/bcl/monotouch_runtime/% | $(PREFIX)/lib/mono/Xamarin.iOS/repl
$(Q) install -m 0755 $< $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/Xamarin.iOS/%: $(BUILD_DESTDIR)/bcl/monotouch/% | $(PREFIX)/lib/mono/Xamarin.iOS $(PREFIX)/lib/mono/Xamarin.iOS/Facades
$(Q) install -m 0644 $< $@
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/2.1/repl/%: $(BUILD_DESTDIR)/bcl/monotouch_runtime/% | $(PREFIX)/lib/mono/2.1/repl
2016-04-21 14:18:44 +03:00
$(Q) install -m 0755 $< $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/2.1/%: $(BUILD_DESTDIR)/bcl/monotouch/% | $(PREFIX)/lib/mono/2.1 $(PREFIX)/lib/mono/2.1/Facades
2016-04-21 14:18:44 +03:00
$(Q) install -m 0755 $< $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/Xamarin.WatchOS/repl/%: $(BUILD_DESTDIR)/bcl/monotouch_watch_runtime/% | $(PREFIX)/lib/mono/Xamarin.WatchOS/repl
2016-04-21 14:18:44 +03:00
$(Q) install -m 0755 $< $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/Xamarin.WatchOS/%: $(BUILD_DESTDIR)/bcl/monotouch_watch/% | $(PREFIX)/lib/mono/Xamarin.WatchOS $(PREFIX)/lib/mono/Xamarin.WatchOS/Facades
2016-04-21 14:18:44 +03:00
$(Q) install -m 0755 $< $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/Xamarin.TVOS/repl/%: $(BUILD_DESTDIR)/bcl/monotouch_tv_runtime/% | $(PREFIX)/lib/mono/Xamarin.TVOS/repl
2016-04-21 14:18:44 +03:00
$(Q) install -m 0755 $< $@
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/lib/mono/Xamarin.TVOS/%: $(BUILD_DESTDIR)/bcl/monotouch_tv/% | $(PREFIX)/lib/mono/Xamarin.TVOS $(PREFIX)/lib/mono/Xamarin.TVOS/Facades
2016-04-21 14:18:44 +03:00
$(Q) install -m 0755 $< $@
# copy to temporary directory before signing
2016-04-21 14:18:44 +03:00
# otherwise we end up re-signing if installing into a different directory.
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
TMP_BCL_TARGET_DIRS = \
$(BUILD_DESTDIR)/bcl/monotouch \
$(BUILD_DESTDIR)/bcl/monotouch/Facades \
$(BUILD_DESTDIR)/bcl/monotouch_runtime \
$(BUILD_DESTDIR)/bcl/monotouch_tv \
$(BUILD_DESTDIR)/bcl/monotouch_tv/Facades \
$(BUILD_DESTDIR)/bcl/monotouch_tv_runtime \
$(BUILD_DESTDIR)/bcl/monotouch_watch \
$(BUILD_DESTDIR)/bcl/monotouch_watch/Facades \
$(BUILD_DESTDIR)/bcl/monotouch_watch_runtime \
$(BUILD_DESTDIR)/bcl/xammac \
$(BUILD_DESTDIR)/bcl/xammac/Facades \
$(BUILD_DESTDIR)/bcl/xammac_net_4_5 \
$(BUILD_DESTDIR)/bcl/xammac_net_4_5/Facades \
$(BUILD_DESTDIR)/bcl/%.dll: $(MONO_PATH)/mcs/class/lib/%.dll | $(TMP_BCL_TARGET_DIRS)
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(Q_SN) MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -R $@ $(PRODUCT_KEY_PATH)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/bcl/%.pdb: $(MONO_PATH)/mcs/class/lib/%.pdb | $(TMP_BCL_TARGET_DIRS)
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(IOS_BCL_TARGETS_DIRS) $(WATCH_BCL_TARGETS_DIRS) $(TVOS_BCL_TARGETS_DIRS):
$(Q) mkdir -p $@
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
# Keep all intermediate files always.
.SECONDARY:
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
install-tools-tvos: $(TVOS_BCL_TARGETS) tvos-facade-check
@true
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
install-tools-watch: $(WATCH_BCL_TARGETS) watch-facade-check
@true
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
install-tools-ios: $(IOS_BCL_TARGETS) ios-facade-check
@true
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
install-tools-mac: $(MAC_BCL_TARGETS) mac-facade-check
@true
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
build-watchbcl: $(WATCH_BCL_TARGETS)
@true
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(IOS_BCL_TARGETS): .stamp-build-tools64
$(TVOS_BCL_TARGETS): .stamp-build-tools64
$(MAC_BCL_TARGETS): .stamp-build-tools64
$(WATCH_BCL_TARGETS): .stamp-build-tools64
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
ifdef INCLUDE_IOS
build-tools64: $(IOS_BCL_TARGETS)
endif
ifdef INCLUDE_TVOS
build-tools64: $(TVOS_BCL_TARGETS)
endif
ifdef INCLUDE_WATCH
build-tools64: $(WATCH_BCL_TARGETS)
endif
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
build-tools64: $(MAC_BCL_TARGETS)
@true
2016-04-21 14:18:44 +03:00
verify-signature:
for file in $(PREFIX)/lib/mono/2.1/*.dll; do \
MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $$file; \
done
@MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $(PREFIX)/lib/mono/2.1/monotouch.dll \
@MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $(PREFIX)/lib/mono/2.1/MonoTouch.Dialog.dll \
@MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $(PREFIX)/lib/mono/2.1/MonoTouch.NUnitLite.dll \
@MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $(PREFIX)/lib/mono/2.1/OpenTK.dll \
@MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $(PREFIX)/lib/mono/2.1/OpenTK-10.dll
for file in $(IOS_FACADE_ASSEMBLIES); do \
MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -v $(PREFIX)/lib/mono/2.1/Facades/$$file.dll; \
done
#
# Simulator builds
#
SIM_BIN=$(SIMULATOR_BIN_PATH)
SIM_ACVARS = \
$(COMMON_ACVARS) \
ac_cv_func_clock_nanosleep=no \
mono_cv_uscore=yes \
ac_cv_func_system=no \
2016-04-21 14:18:44 +03:00
#
# Parameters:
# $(1): arch
# $(2): target prefix
# $(3): mono sdk target prefix
# $(4): mono sdk dir name
#
2016-04-21 14:18:44 +03:00
define SimulatorBuildTemplate
.PHONY: $(2)
$(2):: build-$(2)
build:: build-$(2)
clean-local:: clean-$(2)
.stamp-build-$(2): $(MONO_PATH)/configure $(MONO_DEPENDENCIES) $(BUILD_DESTDIR)/$(2)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-$(3) $(SDK_ARGS)
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-$(4)/lib $(BUILD_DESTDIR)/$(2)
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-$(4)/include $(BUILD_DESTDIR)/$(2)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $$@
build-$(2): .stamp-build-$(2)
2016-04-21 14:18:44 +03:00
clean-$(2):
-rm -rf .stamp-*-$(2) $(BUILD_DESTDIR)/$(2)
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-$(3) $(SDK_ARGS)
2016-04-21 14:18:44 +03:00
build-iphonesimulator:: build-$(2)
clean-iphonesimulator:: clean-$(2)
$(eval SIM_TARGET_LIBMONOSGEN:=$(SIM_TARGET_LIBMONOSGEN) $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a)
$(eval SIM_TARGET_SHAREDMONOSGEN:=$(SIM_TARGET_SHAREDMONOSGEN) $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.dylib)
$(eval SIM_TARGET_LIBLOGPROFILER:=$(SIM_TARGET_LIBLOGPROFILER) $(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log-static.a)
2016-04-21 14:18:44 +03:00
$(eval SIM_TARGET_SHAREDLIBLOGPROFILER:=$(SIM_TARGET_SHAREDLIBLOGPROFILER) $(BUILD_DESTDIR)/$(2)/tmp-lib/libmono-profiler-log.0.dylib)
2018-10-15 22:39:29 +03:00
$(eval SIM_TARGET_LIBMONONATIVECOMPAT:=$(SIM_TARGET_LIBMONONATIVECOMPAT) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.a)
$(eval SIM_TARGET_LIBMONONATIVEUNIFIED:=$(SIM_TARGET_LIBMONONATIVEUNIFIED) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.a)
$(eval SIM_TARGET_SHAREDLIBMONONATIVECOMPAT:=$(SIM_TARGET_SHAREDLIBMONONATIVECOMPAT) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.dylib)
$(eval SIM_TARGET_SHAREDLIBMONONATIVEUNIFIED:=$(SIM_TARGET_SHAREDLIBMONONATIVEUNIFIED) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.dylib)
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.dylib: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log-static.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log.0.dylib: .stamp-build-$(2)
2018-10-15 22:39:29 +03:00
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.dylib: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.dylib: .stamp-build-$(2)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/$(2)/tmp-lib/libmono-profiler-log.0.dylib: $(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log.0.dylib | $(BUILD_DESTDIR)/$(2)/tmp-lib
$(Q) $(CP) $$< $$@
$(Q) install_name_tool -id @rpath/libmono-profiler-log.dylib -change $(SDK_DESTDIR)/ios-$(4)/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $$@
$(BUILD_DESTDIR)/$(2):
$$(Q) mkdir -p $$@
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/$(2)/tmp-lib:
$$(Q) mkdir -p $$@
endef
ifdef INCLUDE_IOS
$(eval $(call SimulatorBuildTemplate,i386,simulator86,sim32,sim32-release))
$(eval $(call SimulatorBuildTemplate,x86_64,simulator64,sim64,sim64-release))
2016-04-21 14:18:44 +03:00
endif
iphonesimulator:: setup-iphonesimulator build-iphonesimulator install-iphonesimulator
# this needs to be here because the normal usage of this makefile is "make all install", but nothing actually lists the -iphonesimulator targets as dependencies.
ifdef INCLUDE_IOS
install-local:: install-iphonesimulator
all-local:: install-iphonesimulator
2016-04-21 14:18:44 +03:00
endif
IPHONESIMULATOR_TARGETS = \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmonosgen-2.0.a \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmonosgen-2.0.dylib \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-profiler-log.a \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-profiler-log.dylib \
2018-10-15 22:39:29 +03:00
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-compat.a \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-unified.a \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-compat.dylib \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework/Mono \
$(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist \
IPHONESIMULATOR_DIRECTORIES = \
$(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework \
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmonosgen-2.0.a: $(SIM_TARGET_LIBMONOSGEN) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmonosgen-2.0.dylib: $(SIM_TARGET_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_SHAREDMONOSGEN) -create -output $@
$(Q) install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-profiler-log.a: $(SIM_TARGET_LIBLOGPROFILER) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_LIBLOGPROFILER) -create -output $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-profiler-log.dylib: $(SIM_TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_SHAREDLIBLOGPROFILER) -create -output $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
2018-10-15 22:39:29 +03:00
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-compat.a: $(SIM_TARGET_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_LIBMONONATIVECOMPAT) -create -output $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-unified.a: $(SIM_TARGET_LIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_LIBMONONATIVEUNIFIED) -create -output $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-compat.dylib: $(SIM_TARGET_SHAREDLIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_SHAREDLIBMONONATIVECOMPAT) -create -output $@
$(Q) install_name_tool -id @rpath/libmono-native-compat.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmono-native-unified.dylib: $(SIM_TARGET_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib
$(Q) lipo $(SIM_TARGET_SHAREDLIBMONONATIVEUNIFIED) -create -output $@
$(Q) install_name_tool -id @rpath/libmono-native-unified.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IPHONESIMULATOR_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework/Mono: $(IOS_DESTDIR)$(IPHONESIMULATOR_PREFIX)/lib/libmonosgen-2.0.dylib | $(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(Q) install_name_tool -id @rpath/Mono.framework/Mono $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-Info.plist | $(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
install-iphonesimulator:: $(IPHONESIMULATOR_TARGETS)
#
# Watch simulator build
#
ifdef INCLUDE_WATCH
build:: build-watchsimulator
clean-local:: clean-watchsimulator
install-local:: install-watchsimulator
all-local:: install-watchsimulator
2016-04-21 14:18:44 +03:00
watchsimulator: build-watchsimulator install-watchsimulator
.PHONY: watchsimulator
endif
.stamp-build-watchsimulator: $(MONO_PATH)/configure $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-simwatch $(SDK_ARGS)
$(Q) mkdir -p $(BUILD_DESTDIR)/watchsimulator
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-simwatch-release/lib $(BUILD_DESTDIR)/watchsimulator
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-simwatch-release/include $(BUILD_DESTDIR)/watchsimulator
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $@
build-watchsimulator: .stamp-build-watchsimulator
2016-04-21 14:18:44 +03:00
clean-watchsimulator:
$(Q) rm -rf .stamp-*-watchsimulator $(BUILD_DESTDIR)/watchsimulator
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-simwatch $(SDK_ARGS)
2016-04-21 14:18:44 +03:00
2018-11-14 21:16:13 +03:00
WATCHSIMULATOR_LIBMONOSGEN = $(BUILD_DESTDIR)/watchsimulator/lib/libmonosgen-2.0.a
WATCHSIMULATOR_SHAREDMONOSGEN = $(BUILD_DESTDIR)/watchsimulator/lib/libmonosgen-2.0.dylib
WATCHSIMULATOR_LIBLOGPROFILER = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-profiler-log-static.a
WATCHSIMULATOR_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-profiler-log.0.dylib
WATCHSIMULATOR_LIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-native-compat.a
WATCHSIMULATOR_LIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-native-unified.a
WATCHSIMULATOR_SHAREDLIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-native-compat.dylib
WATCHSIMULATOR_SHAREDLIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-native-unified.dylib
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(WATCHSIMULATOR_LIBMONOSGEN): .stamp-build-watchsimulator
$(WATCHSIMULATOR_SHAREDMONOSGEN): .stamp-build-watchsimulator
$(WATCHSIMULATOR_LIBLOGPROFILER): .stamp-build-watchsimulator
$(WATCHSIMULATOR_SHAREDLIBLOGPROFILER): .stamp-build-watchsimulator
2018-11-14 21:16:13 +03:00
$(WATCHSIMULATOR_LIBMONONATIVECOMPAT): .stamp-build-watchsimulator
$(WATCHSIMULATOR_LIBMONONATIVEUNIFIED): .stamp-build-watchsimulator
$(WATCHSIMULATOR_SHAREDLIBMONONATIVECOMPAT): .stamp-build-watchsimulator
$(WATCHSIMULATOR_SHAREDLIBMONONATIVEUNIFIED): .stamp-build-watchsimulator
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
2016-04-21 14:18:44 +03:00
WATCHSIMULATOR_TARGETS = \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.dylib \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-profiler-log.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-profiler-log.dylib \
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-compat.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-unified.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-compat.dylib \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework/Mono \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist \
WATCHSIMULATOR_DIRECTORIES = \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib \
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.a: $(WATCHSIMULATOR_LIBMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.dylib: $(WATCHSIMULATOR_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_SHAREDMONOSGEN) -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-profiler-log.a: $(WATCHSIMULATOR_LIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_LIBLOGPROFILER) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-profiler-log.dylib: $(WATCHSIMULATOR_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_SHAREDLIBLOGPROFILER) -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-profiler-log.dylib -change $(SDK_DESTDIR)/ios-simwatch-release/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-compat.a: $(WATCHSIMULATOR_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_LIBMONONATIVECOMPAT) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-compat.dylib: $(WATCHSIMULATOR_SHAREDLIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_SHAREDLIBMONONATIVECOMPAT) -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-compat.dylib -change $(SDK_DESTDIR)/ios-simwatch-release/lib/libmono-native-compat.dylib @rpath/libmono-native-compat.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-unified.a: $(WATCHSIMULATOR_LIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_LIBMONONATIVEUNIFIED) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmono-native-unified.dylib: $(WATCHSIMULATOR_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHSIMULATOR_SHAREDLIBMONONATIVEUNIFIED) -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-unified.dylib -change $(SDK_DESTDIR)/ios-simwatch-release/lib/libmono-native-unified.dylib @rpath/libmono-native-unified.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(WATCHSIMULATOR_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework/Mono: $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.dylib | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/Mono.framework/Mono $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-watchos.Info.plist | $(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
install-watchsimulator: $(WATCHSIMULATOR_TARGETS)
#
# TV simulator build
#
ifdef INCLUDE_TVOS
build:: build-tvsimulator
clean-local:: clean-tvsimulator
install-local:: install-tvsimulator
all-local:: install-tvsimulator
2016-04-21 14:18:44 +03:00
tvsimulator: build-tvsimulator install-tvsimulator
.PHONY: tvsimulator
endif
.stamp-build-tvsimulator: $(MONO_PATH)/configure $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-simtv $(SDK_ARGS)
$(Q) mkdir -p $(BUILD_DESTDIR)/tvsimulator
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-simtv-release/lib $(BUILD_DESTDIR)/tvsimulator
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-simtv-release/include $(BUILD_DESTDIR)/tvsimulator
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $@
build-tvsimulator: .stamp-build-tvsimulator
2016-04-21 14:18:44 +03:00
clean-tvsimulator:
$(Q) rm -rf .stamp-*-tvsimulator $(BUILD_DESTDIR)/tvsimulator
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-simtv $(SDK_ARGS)
2016-04-21 14:18:44 +03:00
2018-11-14 21:16:13 +03:00
TVSIMULATOR_LIBMONOSGEN = $(BUILD_DESTDIR)/tvsimulator/lib/libmonosgen-2.0.a
TVSIMULATOR_SHAREDMONOSGEN = $(BUILD_DESTDIR)/tvsimulator/lib/libmonosgen-2.0.dylib
TVSIMULATOR_LIBLOGPROFILER = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-profiler-log-static.a
TVSIMULATOR_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-profiler-log.0.dylib
TVSIMULATOR_LIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-native-compat.a
TVSIMULATOR_LIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-native-unified.a
TVSIMULATOR_SHAREDLIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-native-compat.dylib
TVSIMULATOR_SHAREDLIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-native-unified.dylib
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(TVSIMULATOR_LIBMONOSGEN): .stamp-build-tvsimulator
$(TVSIMULATOR_SHAREDMONOSGEN): .stamp-build-tvsimulator
$(TVSIMULATOR_LIBLOGPROFILER): .stamp-build-tvsimulator
$(TVSIMULATOR_SHAREDLIBLOGPROFILER): .stamp-build-tvsimulator
2018-11-14 21:16:13 +03:00
$(TVSIMULATOR_LIBMONONATIVECOMPAT): .stamp-build-tvsimulator
$(TVSIMULATOR_LIBMONONATIVEUNIFIED): .stamp-build-tvsimulator
$(TVSIMULATOR_SHAREDLIBMONONATIVECOMPAT): .stamp-build-tvsimulator
$(TVSIMULATOR_SHAREDLIBMONONATIVEUNIFIED): .stamp-build-tvsimulator
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
2016-04-21 14:18:44 +03:00
TVSIMULATOR_TARGETS = \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.a \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.dylib \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-profiler-log.a \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-profiler-log.dylib \
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-compat.a \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-unified.a \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-compat.dylib \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework/Mono \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist \
TVSIMULATOR_DIRECTORIES = \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib \
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.a: $(TVSIMULATOR_LIBMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.dylib: $(TVSIMULATOR_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_SHAREDMONOSGEN) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-profiler-log.a: $(TVSIMULATOR_LIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_LIBLOGPROFILER) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-profiler-log.dylib: $(TVSIMULATOR_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_SHAREDLIBLOGPROFILER) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmono-profiler-log.dylib -change $(SDK_DESTDIR)/ios-simtv-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-compat.a: $(TVSIMULATOR_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_LIBMONONATIVECOMPAT) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-compat.dylib: $(TVSIMULATOR_SHAREDLIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_SHAREDLIBMONONATIVECOMPAT) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-compat.dylib -change $(SDK_DESTDIR)/ios-simtv-release/lib/libmono-native-compat.dylib @rpath/libmono-native-compat.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-unified.a: $(TVSIMULATOR_LIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_LIBMONONATIVEUNIFIED) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmono-native-unified.dylib: $(TVSIMULATOR_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_SHAREDLIBMONONATIVEUNIFIED) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-unified.dylib -change $(SDK_DESTDIR)/ios-simtv-release/lib/libmono-native-unified.dylib @rpath/libmono-native-unified.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(TVSIMULATOR_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework/Mono: $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/lib/libmonosgen-2.0.dylib | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/Mono.framework/Mono $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-tvos.Info.plist | $(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
install-tvsimulator: $(TVSIMULATOR_TARGETS)
##
2016-04-21 14:18:44 +03:00
# Device builds
#
# We use --build=i386-apple-darwin10 explicitly here so that even though osx defaults to 64 bit,
# we end up with a sizeof-compatible built (since all current arms are 32b)
#
PLATFORM_BIN=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin
PLATFORM_SDK=$(DEVICE_SDK)
2016-04-21 14:18:44 +03:00
# usage $(call DeviceBuildTemplate (armv7,target7,<platform suffix>,<configure flags>,<unused>))
2016-04-21 14:18:44 +03:00
define DeviceBuildTemplate
2016-04-21 14:18:44 +03:00
# $(1) architecture
# $(2) target prefix
# $(3) mono sdk target
2016-04-21 14:18:44 +03:00
# $(4) contains the architecture specific configure flags
# $(5) contains min ios version
2016-04-21 14:18:44 +03:00
.PHONY: $(2)
$(2): build-$(2)
build:: build-$(2)
clean-local:: clean-$(2)
.stamp-build-$(2): $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-$(3) $(SDK_ARGS)
$(Q) mkdir -p $(BUILD_DESTDIR)/$(2)
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-$(3)-release/* $(BUILD_DESTDIR)/$(2)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $$@
build-$(2): .stamp-build-$(2)
2016-04-21 14:18:44 +03:00
clean-$(2):
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-$(3) $(SDK_ARGS)
-rm -rf .stamp-*-$(2) $(BUILD_DESTDIR)/$(2)
2016-04-21 14:18:44 +03:00
setup-iphoneos::
2016-04-21 14:18:44 +03:00
build-iphoneos:: build-$(2)
clean-iphoneos:: clean-$(2)
build-ios: build-iphoneos
clean-ios: clean-iphoneos
install-ios: install-iphoneos
$(eval TARGET_LIBMONOSGEN:=$(TARGET_LIBMONOSGEN) $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a)
$(eval TARGET_SHAREDMONOSGEN:=$(TARGET_SHAREDMONOSGEN) $(BUILD_DESTDIR)/$(2)/tmp-lib/libmonosgen-2.0.dylib)
$(eval TARGET_LIBLOGPROFILER:=$(TARGET_LIBLOGPROFILER) $(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log-static.a)
$(eval TARGET_LIBMONOEEINTERP:=$(TARGET_LIBMONOEEINTERP) $(BUILD_DESTDIR)/$(2)/lib/libmono-ee-interp.a)
$(eval TARGET_LIBMONOICALLTABLE:=$(TARGET_LIBMONOICALLTABLE) $(BUILD_DESTDIR)/$(2)/lib/libmono-icall-table.a)
$(eval TARGET_LIBMONOILGEN:=$(TARGET_LIBMONOILGEN) $(BUILD_DESTDIR)/$(2)/lib/libmono-ilgen.a)
2016-04-21 14:18:44 +03:00
$(eval TARGET_SHAREDLIBLOGPROFILER:=$(TARGET_SHAREDLIBLOGPROFILER) $(BUILD_DESTDIR)/$(2)/tmp-lib/libmono-profiler-log.0.dylib)
2018-10-15 22:39:29 +03:00
$(eval TARGET_LIBMONONATIVECOMPAT:=$(TARGET_LIBMONONATIVECOMPAT) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.a)
$(eval TARGET_LIBMONONATIVEUNIFIED:=$(TARGET_LIBMONONATIVEUNIFIED) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.a)
$(eval TARGET_SHAREDLIBMONONATIVECOMPAT:=$(TARGET_SHAREDLIBMONONATIVECOMPAT) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.dylib)
$(eval TARGET_SHAREDLIBMONONATIVEUNIFIED:=$(TARGET_SHAREDLIBMONONATIVEUNIFIED) $(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.dylib)
2016-04-21 14:18:44 +03:00
$(eval TARGET_MONOFRAMEWORK:=$(TARGET_MONOFRAMEWORK) $(BUILD_DESTDIR)/$(2)/tmp-lib/Mono)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log-static.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-ee-interp.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-icall-table.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-ilgen.a: .stamp-build-$(2)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log.a: .stamp-build-$(2)
2018-10-15 22:39:29 +03:00
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.a: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-compat.dylib: .stamp-build-$(2)
$(BUILD_DESTDIR)/$(2)/lib/libmono-native-unified.dylib: .stamp-build-$(2)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/$(2)/tmp-lib:
$$(Q) mkdir -p $$@
# We have the following requirements:
#
# * libmonos*.a: must have miphone-version-min=5.1.1 (the earliest iOS version we support) - although it's 7.0 for the ARM64 slice.
# * libmonosgen-2.0.dylib: must have miphone-version-min=7.0 (otherwise iOS 9 won't load it; see bug #34267).
# * libmono-profiler-log.dylib: same as libmonosgen-2.0.dylib
# * Mono.framework/Mono: must have miphone-version-min=8.0, otherwise the native linker won't add a LC_ENCRYPTION_INFO load command,
# which the App Store requires (see bug #32820). This is not a problem for libmonosgen-2.0.dylib, because that library is only
# used for incremental builds, which are not published).
#
# And we don't want to build Mono 3 times for each architecture...
#
# So what we do is to take the static library (libmonosgen-2.0.a), extract all the object files, and re-link
# them the required times according to how many versions we need.
#
$(BUILD_DESTDIR)/$(2)/tmp-lib/Mono: $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a | $(BUILD_DESTDIR)/$(2)/tmp-lib
$$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $$< $$@ -arch $(1) -install_name @rpath/Mono.framework/Mono -miphoneos-version-min=8.0 -isysroot $(PLATFORM_SDK) $(IOS_BITCODE_LDFLAGS)
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/$(2)/tmp-lib/libmonosgen-2.0.dylib: $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a | $(BUILD_DESTDIR)/$(2)/tmp-lib
$$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $$< $$@ -arch $(1) -install_name @rpath/libmonosgen-2.0.dylib -miphoneos-version-min=7.0 -isysroot $(PLATFORM_SDK) $(IOS_BITCODE_LDFLAGS) -lz
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/$(2)/tmp-lib/libmono-profiler-log.0.dylib: $(BUILD_DESTDIR)/$(2)/lib/libmono-profiler-log.a $(BUILD_DESTDIR)/$(2)/tmp-lib/libmonosgen-2.0.dylib | $(BUILD_DESTDIR)/$(2)/tmp-lib
$$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $$< $$@ -arch $(1) -install_name @rpath/libmono-profiler-log.dylib -miphoneos-version-min=7.0 -isysroot $(PLATFORM_SDK) $(IOS_BITCODE_LDFLAGS) -L$(BUILD_DESTDIR)/$(2)/tmp-lib -lmonosgen-2.0 -lz
2016-04-21 14:18:44 +03:00
endef
ARM_ARCH_CONFIGURE_FLAGS=--host=arm-apple-darwin10 --disable-boehm
ARM64_ARCH_CONFIGURE_FLAGS=--host=aarch64-apple-darwin10 --disable-boehm
ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
ifndef DEVICE_RUNTIMES
DEVICE_RUNTIMES="armv7 armv7s arm64 "
endif
endif
endif
2016-04-21 14:18:44 +03:00
# Note the spaces in findstring arguments, this is needed to distinguish between armv7 and armv7s for example
ifneq ($(findstring armv7 , $(DEVICE_RUNTIMES) ),)
$(eval $(call DeviceBuildTemplate,armv7,target7,target32,$(ARM_ARCH_CONFIGURE_FLAGS),$(MIN_IOS_SDK_VERSION)))
2016-04-21 14:18:44 +03:00
endif
ifneq ($(findstring armv7s , $(DEVICE_RUNTIMES) ),)
$(eval $(call DeviceBuildTemplate,armv7s,target7s,target32s,$(ARM_ARCH_CONFIGURE_FLAGS),$(MIN_IOS_SDK_VERSION)))
2016-04-21 14:18:44 +03:00
endif
ifneq ($(findstring arm64 , $(DEVICE_RUNTIMES) ),)
$(eval $(call DeviceBuildTemplate,arm64,target64,target64,$(ARM64_ARCH_CONFIGURE_FLAGS),7.0))
2016-04-21 14:18:44 +03:00
endif
ifdef INCLUDE_DEVICE
ifdef INCLUDE_IOS
2016-04-21 14:18:44 +03:00
iphoneos:: setup-iphoneos build-iphoneos install-iphoneos
device:: iphoneos
clean-device: clean-iphoneos
install-device: install-iphoneos
2016-04-21 14:18:44 +03:00
# this needs to be here because the normal usage of this makefile is "make all install", but nothing actually lists the -iphoneos targets as dependencies.
install-local:: install-iphoneos
all-local:: install-iphoneos
2016-04-21 14:18:44 +03:00
LIBMONO_PROFILER_IPHONEOS_DYLIB=$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-profiler-log.dylib
2016-04-21 14:18:44 +03:00
IPHONEOS_TARGETS = \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmonosgen-2.0.a \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmonosgen-2.0.dylib \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-profiler-log.a \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-ee-interp.a \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-icall-table.a \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-ilgen.a \
$(LIBMONO_PROFILER_IPHONEOS_DYLIB) \
2018-10-15 22:39:29 +03:00
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-compat.a \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-unified.a \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-compat.dylib \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Mono \
$(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Info.plist \
IPHONEOS_DIRECTORIES = \
$(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib \
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmonosgen-2.0.a: $(TARGET_LIBMONOSGEN) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmonosgen-2.0.dylib: $(TARGET_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_SHAREDMONOSGEN) -create -output $@
$(Q) install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-profiler-log.a: $(TARGET_LIBLOGPROFILER) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBLOGPROFILER) -create -output $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-ee-interp.a: $(TARGET_LIBMONOEEINTERP) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBMONOEEINTERP) -create -output $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-icall-table.a: $(TARGET_LIBMONOICALLTABLE) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBMONOICALLTABLE) -create -output $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-ilgen.a: $(TARGET_LIBMONOILGEN) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBMONOILGEN) -create -output $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-profiler-log.dylib: $(TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_SHAREDLIBLOGPROFILER) -create -output $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
2018-10-15 22:39:29 +03:00
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-compat.a: $(TARGET_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBMONONATIVECOMPAT) -create -output $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-unified.a: $(TARGET_LIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_LIBMONONATIVEUNIFIED) -create -output $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-compat.dylib: $(TARGET_SHAREDLIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_SHAREDLIBMONONATIVECOMPAT) -create -output $@
$(Q) install_name_tool -id @rpath/libmono-native-compat.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-native-unified.dylib: $(TARGET_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_SHAREDLIBMONONATIVEUNIFIED) -create -output $@
$(Q) install_name_tool -id @rpath/libmono-native-unified.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IPHONEOS_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Mono: $(TARGET_MONOFRAMEWORK) | $(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework
$(Q) lipo $(TARGET_MONOFRAMEWORK) -create -output $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-Info.plist | $(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
install-iphoneos:: $(IPHONEOS_TARGETS)
endif # INCLUDE_IOS
endif # INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
#
# Watch device build
#
WATCHOS_SDK = $(DEVICEWATCH_SDK)
2016-04-21 14:18:44 +03:00
WATCHOS_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin
ifdef INCLUDE_WATCH
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
build:: build-targetwatch
clean-local:: clean-targetwatch
install-local:: install-watchos
all-local:: install-watchos
2016-04-21 14:18:44 +03:00
targetwatch: build-targetwatch install-watchos
watchos:: targetwatch
.PHONY: targetwatch
.stamp-build-targetwatch: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targetwatch $(SDK_ARGS)
$(Q) mkdir -p $(BUILD_DESTDIR)/targetwatch
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-targetwatch-release/* $(BUILD_DESTDIR)/targetwatch
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $@
build-targetwatch: .stamp-build-targetwatch
2016-04-21 14:18:44 +03:00
clean-targetwatch:
$(Q) rm -rf $(BUILD_DESTDIR)/targetwatch .stamp-*-targetwatch
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-targetwatch $(SDK_ARGS)
2016-04-21 14:18:44 +03:00
setup-watchos: setup-targetwatch
build-watchos: build-targetwatch
clean-watchos: clean-targetwatch
2018-11-14 21:16:13 +03:00
WATCHOS_TARGET_LIBMONOSGEN = $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.a
WATCHOS_TARGET_SHAREDMONOSGEN = $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.dylib
WATCHOS_TARGET_LIBLOGPROFILER = $(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log-static.a
WATCHOS_TARGET_LIBMONOEEINTERP = $(BUILD_DESTDIR)/targetwatch/lib/libmono-ee-interp.a
WATCHOS_TARGET_LIBMONOICALLTABLE = $(BUILD_DESTDIR)/targetwatch/lib/libmono-icall-table.a
WATCHOS_TARGET_LIBMONOILGEN = $(BUILD_DESTDIR)/targetwatch/lib/libmono-ilgen.a
WATCHOS_TARGET_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log.0.dylib
WATCHOS_TARGET_LIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-compat.a
WATCHOS_TARGET_LIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.a
WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-compat.dylib
WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.dylib
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(WATCHOS_TARGET_LIBMONOSGEN): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDMONOSGEN): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBLOGPROFILER): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONOEEINTERP): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONOICALLTABLE): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONOILGEN): .stamp-build-targetwatch
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(WATCHOS_TARGET_SHAREDLIBLOGPROFILER): .stamp-build-targetwatch
2018-11-14 21:16:13 +03:00
$(WATCHOS_TARGET_LIBMONONATIVECOMPAT): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONONATIVEUNIFIED): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED): .stamp-build-targetwatch
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
2016-04-21 14:18:44 +03:00
device:: watchos
WATCHOS_TARGETS = \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmonosgen-2.0.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmonosgen-2.0.dylib \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-profiler-log.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-ee-interp.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-icall-table.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-ilgen.a \
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-compat.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-unified.a \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-compat.dylib \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Mono \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Info.plist \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-profiler-log.dylib \
2016-04-21 14:18:44 +03:00
WATCHOS_DIRECTORIES = \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib \
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmonosgen-2.0.a: $(WATCHOS_TARGET_LIBMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmonosgen-2.0.dylib: $(WATCHOS_TARGET_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
$(Q_STRIP) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDMONOSGEN) -m -o $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-profiler-log.a: $(WATCHOS_TARGET_LIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBLOGPROFILER) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-ee-interp.a: $(WATCHOS_TARGET_LIBMONOEEINTERP) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONOEEINTERP) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-icall-table.a: $(WATCHOS_TARGET_LIBMONOICALLTABLE) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONOICALLTABLE) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-ilgen.a: $(WATCHOS_TARGET_LIBMONOILGEN) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONOILGEN) -create -output $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-profiler-log.dylib: $(WATCHOS_TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469) This is a series of fixes to the dynamic libraries we build / create to remove any unnecessary bloat (unused architectures, bitcode). A brand new watchOS app with no changes goes from 35MB to 11MB with these fixes (with incremental builds disabled, the app size is 10MB). -------------------------------------------------------------------------------- * [runtime] Split list of architectures into simulator and device-specific lists. * [runtime] Build separate dylibs for device and simulator. Build separate dylibs for device and simulator, since we already install these into different locations. This makes both the simulator and device builds slightly faster (since the respective dylibs are smaller, and less data to copy around). For watchOS apps, this saves ~430kb. * [runtime] Strip bitcode from dylibs. Fixes #51352. We know that dylibs will never be shipped to the App Store, so we'll never need them to have bitcode. So just strip the bitcode from all our dylibs, since this makes apps with fastdev significantly smaller (and thus much faster to upload to watch devices). For watchOS apps this is a very significant improvement: a branch new watchOS app without any changes goes from 35MB to 17MB. https://bugzilla.xamarin.com/show_bug.cgi?id=51352 * [mtouch] Fix dylib compilation to not embed full bitcode. Facts ===== a. The output from the AOT compiler is an assembly (.s) file. b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed- bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler receives a -fembed-bitcode argument. c. This means that the assembled object file does not contain the __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an __LLVM/__asm section). d. The native linker will create a bitcode assembly section if none of the object files passed to the linker contain a __LLVM/__bitcode section and there's an __LLVM/__asm section present. e. The end result is that when we build to a dylib, we end up (unexpectedly, because we ask Clang to -fembed-bitcode-marker) including both armv7k and bitcode in the dylib, thus bloating the dylib size significantly. Solution ======== We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s file Mono's AOT compiler generated. This way the .o file will have the magic sections, and the linker will not include bitcode (only the bitcode marker) in the final library. An empty watchOS extension with incremental builds is now 6MB smaller (down to 11MB from 17MB).
2017-01-16 14:32:06 +03:00
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDLIBLOGPROFILER) -m -o $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-profiler-log.dylib -change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-compat.a: $(WATCHOS_TARGET_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONONATIVECOMPAT) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-unified.a: $(WATCHOS_TARGET_LIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONONATIVEUNIFIED) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-compat.dylib: $(WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT) -m -o $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-compat.dylib -change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmono-native-compat.dylib @rpath/libmono-native-compat.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-unified.dylib: $(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED) -m -o $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-unified.dylib -change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmono-native-unified.dylib @rpath/libmono-native-unified.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(WATCHOS_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Mono: $(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-watchos.Info.plist | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono: $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.a
$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $< $@ -arch armv7k -install_name @rpath/Mono.framework/Mono -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) -lc++ -fembed-bitcode
2016-04-21 14:18:44 +03:00
install-watchos: $(WATCHOS_TARGETS)
endif # INCLUDE_DEVICE
endif # INCLUDE_WATCH
2016-04-21 14:18:44 +03:00
#
# TV device build
#
2016-04-21 14:18:44 +03:00
TVOS_SDK = $(DEVICETV_SDK)
2016-04-21 14:18:44 +03:00
TVOS_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin
ifdef INCLUDE_TVOS
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
build:: build-targettv
clean-local:: clean-targettv
install-local:: install-tvos
all-local:: install-tvos
2016-04-21 14:18:44 +03:00
targettv: build-targettv install-tvos
tvos:: targettv
.PHONY: targettv
.stamp-build-targettv: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targettv $(SDK_ARGS)
$(Q) mkdir -p $(BUILD_DESTDIR)/targettv
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-targettv-release/* $(BUILD_DESTDIR)/targettv
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(Q) touch $@
build-targettv: .stamp-build-targettv
2016-04-21 14:18:44 +03:00
clean-targettv:
$(Q) rm -rf $(BUILD_DESTDIR)/targettv .stamp-*-targettv
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-targettv $(SDK_ARGS)
2016-04-21 14:18:44 +03:00
build-tvos: build-targettv
clean-tvos: clean-targettv
2018-11-14 21:16:13 +03:00
TVOS_TARGET_LIBMONOSGEN = $(BUILD_DESTDIR)/targettv/lib/libmonosgen-2.0.a
TVOS_TARGET_SHAREDMONOSGEN = $(BUILD_DESTDIR)/targettv/lib/libmonosgen-2.0.dylib
TVOS_TARGET_LIBLOGPROFILER = $(BUILD_DESTDIR)/targettv/lib/libmono-profiler-log-static.a
TVOS_TARGET_LIBMONOEEINTERP = $(BUILD_DESTDIR)/targettv/lib/libmono-ee-interp.a
TVOS_TARGET_LIBMONOICALLTABLE = $(BUILD_DESTDIR)/targettv/lib/libmono-icall-table.a
TVOS_TARGET_LIBMONOILGEN = $(BUILD_DESTDIR)/targettv/lib/libmono-ilgen.a
TVOS_TARGET_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/targettv/lib/libmono-profiler-log.0.dylib
TVOS_TARGET_LIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/targettv/lib/libmono-native-compat.a
TVOS_TARGET_LIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/targettv/lib/libmono-native-unified.a
TVOS_TARGET_SHAREDLIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/targettv/lib/libmono-native-compat.dylib
TVOS_TARGET_SHAREDLIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/targettv/lib/libmono-native-unified.dylib
2016-04-21 14:18:44 +03:00
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(TVOS_TARGET_LIBMONOSGEN): .stamp-build-targettv
$(TVOS_TARGET_SHAREDMONOSGEN): .stamp-build-targettv
$(TVOS_TARGET_LIBLOGPROFILER): .stamp-build-targettv
$(TVOS_TARGET_LIBMONOEEINTERP): .stamp-build-targettv
$(TVOS_TARGET_LIBMONOICALLTABLE): .stamp-build-targettv
$(TVOS_TARGET_LIBMONOILGEN): .stamp-build-targettv
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(TVOS_TARGET_SHAREDLIBLOGPROFILER): .stamp-build-targettv
2018-11-14 21:16:13 +03:00
$(TVOS_TARGET_LIBMONONATIVECOMPAT): .stamp-build-targettv
$(TVOS_TARGET_LIBMONONATIVEUNIFIED): .stamp-build-targettv
$(TVOS_TARGET_SHAREDLIBMONONATIVECOMPAT): .stamp-build-targettv
$(TVOS_TARGET_SHAREDLIBMONONATIVEUNIFIED): .stamp-build-targettv
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
2016-04-21 14:18:44 +03:00
device:: tvos
TVOS_TARGETS = \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmonosgen-2.0.a \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmonosgen-2.0.dylib \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-profiler-log.a \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-ee-interp.a \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-icall-table.a \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-ilgen.a \
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-compat.a \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-unified.a \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-compat.dylib \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-unified.dylib \
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework/Mono \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework/Info.plist \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-profiler-log.dylib \
2016-04-21 14:18:44 +03:00
TVOS_DIRECTORIES = \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib \
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmonosgen-2.0.a: $(TVOS_TARGET_LIBMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmonosgen-2.0.dylib: $(TVOS_TARGET_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_SHAREDMONOSGEN) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-profiler-log.a: $(TVOS_TARGET_LIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_LIBLOGPROFILER) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-ee-interp.a: $(TVOS_TARGET_LIBMONOEEINTERP) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_LIBMONOEEINTERP) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-icall-table.a: $(TVOS_TARGET_LIBMONOICALLTABLE) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_LIBMONOICALLTABLE) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-ilgen.a: $(TVOS_TARGET_LIBMONOILGEN) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_LIBMONOILGEN) -create -output $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-profiler-log.dylib: $(TVOS_TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) lipo $(TVOS_TARGET_SHAREDLIBLOGPROFILER) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmono-profiler-log.dylib -change $(SDK_DESTDIR)/ios-targettv-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
2018-11-14 21:16:13 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-compat.a: $(TVOS_TARGET_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVSIMULATOR_LIBMONONATIVECOMPAT) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-compat.dylib: $(TVOS_TARGET_SHAREDLIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_SHAREDLIBMONONATIVECOMPAT) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-compat.dylib -change $(SDK_DESTDIR)/ios-targettv-release/lib/libmono-native-compat.dylib @rpath/libmono-native-compat.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-unified.a: $(TVOS_TARGET_LIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_LIBMONONATIVEUNIFIED) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmono-native-unified.dylib: $(TVOS_TARGET_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib
$(Q) $(TVOS_BIN_PATH)/lipo $(TVOS_TARGET_SHAREDLIBMONONATIVEUNIFIED) -create -output $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-unified.dylib -change $(SDK_DESTDIR)/ios-targettv-release/lib/libmono-native-unified.dylib @rpath/libmono-native-unified.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
2016-04-21 14:18:44 +03:00
$(TVOS_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework/Mono: $(BUILD_DESTDIR)/targettv/tmp-lib/Mono | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
2016-04-21 14:18:44 +03:00
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-tvos.Info.plist | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
2016-04-21 14:18:44 +03:00
$(BUILD_DESTDIR)/targettv/tmp-lib/Mono: $(BUILD_DESTDIR)/targettv/lib/libmonosgen-2.0.a
$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $< $@ -arch arm64 -install_name @rpath/Mono.framework/Mono -mtvos-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(DEVICETV_SDK) -lc++ -fembed-bitcode
2016-04-21 14:18:44 +03:00
install-tvos: $(TVOS_TARGETS)
endif # INCLUDE_DEVICE
endif # INCLUDE_TVOS
2016-04-21 14:18:44 +03:00
#
# Cross compilers
#
# This is the cross aot version of mono. runs on x86 but the jit/aot spits out arm.
2016-04-21 14:18:44 +03:00
#
# There are two versions of the cross compiler, a 32 bit version targeting arm, and a 64
# bit version targeting arm64.
# These are compiled using the mono sdk makefiles
2016-04-21 14:18:44 +03:00
#
install-directories:
install -d $(PREFIX)/bin
install -d $(PREFIX)/share/mono
install -d $(PREFIX)/lib/mono/2.1/Facades
install -d $(PREFIX)/lib/mono/Xamarin.iOS
install -d $(IOS_DESTDIR)/$(IPHONESIMULATOR_PREFIX)/include
install -d $(IOS_DESTDIR)/$(IPHONESIMULATOR_PREFIX)/lib
install -d $(IOS_DESTDIR)/$(IPHONEOS_PREFIX)/include
install -d $(IOS_DESTDIR)/$(IPHONEOS_PREFIX)/lib
2016-04-21 14:18:44 +03:00
#
# Add explicit targets for building llvm before building the cross compilers, to
# avoid building/downloading it in parallel by the nested make invocations.
2016-04-21 14:18:44 +03:00
#
ifdef INCLUDE_DEVICE
clean-local:: clean-llvm
endif
2016-04-21 14:18:44 +03:00
build-llvm32: .stamp-build-llvm32
build-llvm64: .stamp-build-llvm64
2016-04-21 14:18:44 +03:00
.stamp-compile-llvm64: $(SDK_CONFIG)
$(MAKE) -C $(MONO_SDK_BUILDDIR) provision-llvm-llvm64 $(SDK_ARGS)
$(Q) touch $@
.stamp-compile-llvm32: $(SDK_CONFIG)
2019-01-17 16:35:28 +03:00
$(MAKE) -C $(MONO_SDK_BUILDDIR) provision-llvm36-llvm32 $(SDK_ARGS)
2016-04-21 14:18:44 +03:00
$(Q) touch $@
.stamp-build-llvm64: .stamp-$(MONO_BUILD_MODE)-llvm64
.stamp-build-llvm32: .stamp-$(MONO_BUILD_MODE)-llvm32
clean-llvm: $(SDK_CONFIG)
$(MAKE) -C $(MONO_SDK_BUILDDIR) clean-llvm36-llvm32 clean-llvm-llvm64 $(SDK_ARGS)
$(RM) .stamp-*-llvm*
2016-04-21 14:18:44 +03:00
.PHONY: install-llvm64 install-llvm32 llvm32 llvm64
2016-04-21 14:18:44 +03:00
LLVM64_TARGETS = \
2016-04-21 14:18:44 +03:00
$(PREFIX)/LLVM/bin/opt \
$(PREFIX)/LLVM/bin/llc \
LLVM32_TARGETS = \
Bump to mono:2018-06 (#4277) * Bump to mono:2018-06 * Bump mono * Updates compression to work with the public span * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Bump Mono * [runtime] always use `mono_jit_set_aot_mode` (#4491) `mono_jit_set_aot_only` is deprecated and accidentally broke with https://github.com/mono/mono/pull/7887 This should fix device tests with `mono-2018-06` * Testing with Zoltan's patch * Include libmono-system-native on Xamarin.Mac * Bump Mono Commit list for mono/mono: * mono/mono@7bcda192a06 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804) * mono/mono@23e95ec7ad7 Apply F# portable pdb debug fix for pinvokes & bump (#9797) * mono/mono@295f6d32afd [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696) Diff: https://github.com/mono/mono/compare/7d5f4b61366008d47665bb473205f4ae1f716d1f...7bcda192a06267562af565d404c06d159f475c03 * Revert 4bacab3d5c7fa86a0e6437f64bb9f08ea3d0741b, it doesn't fix the ios aot problems. * Bump mono * [tests] Adjust the MT0137 test for mcs change in behavior. Starting with mono 5.16 mcs will now add assembly references when the assembly is only used in attributes (this was already the case for csc in both 5.14 and 5.16, so it seems to be a compatibility change). Adjust the MT0137 test accordingly. * [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message. Fixes this test: 1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException ColumnNumber Expected: 2 But was: 0 * Bump mono * [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that. * Bump mono * Bump mono * [jenkins] Don't give VSTS a fake branch. (#4667) Something in VSTS changed, and now fake branch names don't work anymore. So instead use real branch names (and for pull requests I've created a 'pull-request' branch we can use). * Assembly.LoadFile accepts only absolute path * [linker] Add new Facade (System.Threading.Tasks.Extensions). Fixes these MTouch test failures: 1. Xamarin.Linker.SdkTest.iOS_Unified : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 2. Xamarin.Linker.SdkTest.tvOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 3. Xamarin.Linker.SdkTest.watchOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > * [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732) * Bump Mono * [mtouch] add mixed-mode support (#4751) * [mtouch] add --interp-mixed option When enabling this option, mtouch will AOT compile `mscorlib.dll`. At runtime that means every method that wasn't AOT'd will be executed by the runtime interpreter. * [mtouch] Add support to --interpreter to list the assemblies to (not) interpret. * [msbuild] Simplify interpreter code to use a single variable. * Fix whitespace. * [mtouch] Move mtouch-specific code to mtouch-specific file. * [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property. * [mtouch] Add sanity check for aot-compiling interpreted assemblies. * Bump Mono * [linker] Updates SDKs facades list * Bump mono * [msbuild] Adds facades which might override default nuget version to framework list The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs * Bump to a VSfM version that can build XM Classic projects.
2018-10-10 18:02:28 +03:00
$(PREFIX)/LLVM36/bin/opt \
$(PREFIX)/LLVM36/bin/llc \
2016-04-21 14:18:44 +03:00
$(MONO_SDK_DESTDIR)/llvm-llvm64/bin/%: .stamp-build-llvm64; @true
$(MONO_SDK_DESTDIR)/llvm36-llvm32/bin/%: .stamp-build-llvm32; @true
Bump to mono:2018-06 (#4277) * Bump to mono:2018-06 * Bump mono * Updates compression to work with the public span * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Bump Mono * [runtime] always use `mono_jit_set_aot_mode` (#4491) `mono_jit_set_aot_only` is deprecated and accidentally broke with https://github.com/mono/mono/pull/7887 This should fix device tests with `mono-2018-06` * Testing with Zoltan's patch * Include libmono-system-native on Xamarin.Mac * Bump Mono Commit list for mono/mono: * mono/mono@7bcda192a06 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804) * mono/mono@23e95ec7ad7 Apply F# portable pdb debug fix for pinvokes & bump (#9797) * mono/mono@295f6d32afd [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696) Diff: https://github.com/mono/mono/compare/7d5f4b61366008d47665bb473205f4ae1f716d1f...7bcda192a06267562af565d404c06d159f475c03 * Revert 4bacab3d5c7fa86a0e6437f64bb9f08ea3d0741b, it doesn't fix the ios aot problems. * Bump mono * [tests] Adjust the MT0137 test for mcs change in behavior. Starting with mono 5.16 mcs will now add assembly references when the assembly is only used in attributes (this was already the case for csc in both 5.14 and 5.16, so it seems to be a compatibility change). Adjust the MT0137 test accordingly. * [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message. Fixes this test: 1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException ColumnNumber Expected: 2 But was: 0 * Bump mono * [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that. * Bump mono * Bump mono * [jenkins] Don't give VSTS a fake branch. (#4667) Something in VSTS changed, and now fake branch names don't work anymore. So instead use real branch names (and for pull requests I've created a 'pull-request' branch we can use). * Assembly.LoadFile accepts only absolute path * [linker] Add new Facade (System.Threading.Tasks.Extensions). Fixes these MTouch test failures: 1. Xamarin.Linker.SdkTest.iOS_Unified : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 2. Xamarin.Linker.SdkTest.tvOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 3. Xamarin.Linker.SdkTest.watchOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > * [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732) * Bump Mono * [mtouch] add mixed-mode support (#4751) * [mtouch] add --interp-mixed option When enabling this option, mtouch will AOT compile `mscorlib.dll`. At runtime that means every method that wasn't AOT'd will be executed by the runtime interpreter. * [mtouch] Add support to --interpreter to list the assemblies to (not) interpret. * [msbuild] Simplify interpreter code to use a single variable. * Fix whitespace. * [mtouch] Move mtouch-specific code to mtouch-specific file. * [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property. * [mtouch] Add sanity check for aot-compiling interpreted assemblies. * Bump Mono * [linker] Updates SDKs facades list * Bump mono * [msbuild] Adds facades which might override default nuget version to framework list The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs * Bump to a VSfM version that can build XM Classic projects.
2018-10-10 18:02:28 +03:00
$(PREFIX)/LLVM/bin/%: $(MONO_SDK_DESTDIR)/llvm-llvm64/bin/% | $(PREFIX)/LLVM/bin
2016-04-21 14:18:44 +03:00
$(call Q_2,INSTALL ,[LLVM64]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@
$(PREFIX)/LLVM36/bin/%: $(MONO_SDK_DESTDIR)/llvm36-llvm32/bin/% | $(PREFIX)/LLVM36/bin
$(call Q_2,INSTALL ,[LLVM32]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@
2016-04-21 14:18:44 +03:00
$(PREFIX)/LLVM/bin $(PREFIX)/LLVM36/bin:
Bump to mono:2018-06 (#4277) * Bump to mono:2018-06 * Bump mono * Updates compression to work with the public span * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Fixes pointer check logic in Deflater * Bump mono * Bump Mono * [runtime] always use `mono_jit_set_aot_mode` (#4491) `mono_jit_set_aot_only` is deprecated and accidentally broke with https://github.com/mono/mono/pull/7887 This should fix device tests with `mono-2018-06` * Testing with Zoltan's patch * Include libmono-system-native on Xamarin.Mac * Bump Mono Commit list for mono/mono: * mono/mono@7bcda192a06 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804) * mono/mono@23e95ec7ad7 Apply F# portable pdb debug fix for pinvokes & bump (#9797) * mono/mono@295f6d32afd [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696) Diff: https://github.com/mono/mono/compare/7d5f4b61366008d47665bb473205f4ae1f716d1f...7bcda192a06267562af565d404c06d159f475c03 * Revert 4bacab3d5c7fa86a0e6437f64bb9f08ea3d0741b, it doesn't fix the ios aot problems. * Bump mono * [tests] Adjust the MT0137 test for mcs change in behavior. Starting with mono 5.16 mcs will now add assembly references when the assembly is only used in attributes (this was already the case for csc in both 5.14 and 5.16, so it seems to be a compatibility change). Adjust the MT0137 test accordingly. * [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message. Fixes this test: 1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException ColumnNumber Expected: 2 But was: 0 * Bump mono * [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that. * Bump mono * Bump mono * [jenkins] Don't give VSTS a fake branch. (#4667) Something in VSTS changed, and now fake branch names don't work anymore. So instead use real branch names (and for pull requests I've created a 'pull-request' branch we can use). * Assembly.LoadFile accepts only absolute path * [linker] Add new Facade (System.Threading.Tasks.Extensions). Fixes these MTouch test failures: 1. Xamarin.Linker.SdkTest.iOS_Unified : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 2. Xamarin.Linker.SdkTest.tvOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > 3. Xamarin.Linker.SdkTest.watchOS : Facades Expected: But was: < "System.Threading.Tasks.Extensions" > * [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732) * Bump Mono * [mtouch] add mixed-mode support (#4751) * [mtouch] add --interp-mixed option When enabling this option, mtouch will AOT compile `mscorlib.dll`. At runtime that means every method that wasn't AOT'd will be executed by the runtime interpreter. * [mtouch] Add support to --interpreter to list the assemblies to (not) interpret. * [msbuild] Simplify interpreter code to use a single variable. * Fix whitespace. * [mtouch] Move mtouch-specific code to mtouch-specific file. * [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property. * [mtouch] Add sanity check for aot-compiling interpreted assemblies. * Bump Mono * [linker] Updates SDKs facades list * Bump mono * [msbuild] Adds facades which might override default nuget version to framework list The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs * Bump to a VSfM version that can build XM Classic projects.
2018-10-10 18:02:28 +03:00
$(Q) mkdir -p $@
install-llvm: install-llvm32 install-llvm64
install-llvm32: $(LLVM32_TARGETS)
install-llvm64: $(LLVM64_TARGETS)
2016-04-21 14:18:44 +03:00
llvm: install-llvm
2016-04-21 14:18:44 +03:00
llvm64: install-llvm64
llvm32: install-llvm32
2016-04-21 14:18:44 +03:00
$(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe: $(MONO_PATH)/configure $(wildcard $(MONO_PATH)/tools/offsets-tool/*.cs)
$(Q) $(MAKE) -C $(dir $@) MonoAotOffsetsDumper.exe
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
targetwatch/mono/arch/arm/arm_dpimacros.h: .stamp-configure-targetwatch
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C $(dir $@) $(notdir $@)
$(PREFIX)/bin:
$(Q) mkdir -p $@
# Dependency used to build the offsets tool before recursively calling sdk makefiles
offsets-tool: $(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe
2016-04-21 14:18:44 +03:00
##
# Cross compiler template
2016-04-21 14:18:44 +03:00
#
# Parameters:
# $(1): target prefix (cross32 etc)
# $(2): llvm (llvm32 or llvm64)
# $(3): cross compiler executable (arm-darwin-mono-sgen)
# $(4): cross compiler executable generated by mono sdk
##
define iOSCrossTemplate
2016-04-21 14:18:44 +03:00
$(1): build-$(1) install-$(1)
2016-04-21 14:18:44 +03:00
.PHONY: build-$(1) install-$(1)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
build:: build-$(1)
install-local:: install-$(1)
clean-local:: clean-$(1)
2016-04-21 14:18:44 +03:00
.stamp-compile-$(1): .stamp-build-llvm64 .stamp-build-llvm32 $(MONO_PATH)/configure $(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe $(MONO_DEPENDENCIES) $(SDK_CONFIG)
$(MAKE) -C $(MONO_SDK_BUILDDIR) package-ios-$(1) $(SDK_ARGS)
$(Q) touch $$@
2016-04-21 14:18:44 +03:00
.stamp-build-$(1): .stamp-$(MONO_BUILD_MODE)-$(1)
build-$(1): .stamp-build-$(1)
2016-04-21 14:18:44 +03:00
_$(1)_CROSS_TARGETS = \
$(PREFIX)/bin/$(3) \
2016-04-21 14:18:44 +03:00
$(SDK_DESTDIR)/ios-$(1)/bin/$(4): .stamp-build-$(1)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
$(PREFIX)/bin/$(3): $(MONO_SDK_DESTDIR)/ios-$(1)-release/bin/$(4) | $(PREFIX)/bin
$(call Q_2,INSTALL ,[CROSS]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $$< $$@
2016-04-21 14:18:44 +03:00
install-$(1): install-$(2) $$(_$(1)_CROSS_TARGETS)
2016-04-21 14:18:44 +03:00
clean-$(1): $(SDK_CONFIG)
$(MAKE) -C $(MONO_SDK_BUILDDIR) clean-ios-$(1) $(SDK_ARGS)
-rm -rf $(MONO_SDK_DESTDIR)/$(1) .stamp-build-$(1)
[builds] Improve mono/llvm dependencies. (#1948) * [builds] Improve mono/llvm dependencies. * Create a list of all the files in the mono and llvm repositories, and save these lists as a Make variable (in a generated Makefile - .deps.*.mk). We don't list _all_ the files in each repository, because there are quite a few (55k for mono), and Make measurably takes a while to check all of them, so try to limit it to a sane subset, without risking missing changes to files that actually matters. * Always create stamp files when we're done with mono builds. * Modify the mono/llvm builds to depend on all the files in their repositories. * Explicitly list the corresponding .stamp-build-* files as dependencies for various files that are produced by the mono builds, so that make knows how to build these files. * Rewrite the *-facade-check targets to depend on the corresponding *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile to execute the facade checks. It now takes a little while (less than a second on my machine, which is fine) for make to list all dependencies and get their timestamps, but if executing multiple submakes this adds up to a multi-second timewaste. So avoid the timewaste by not doing submakes, but instead use dependencies to enforce the required target execution ordering. * Don't depend on nicely named intermediate targets, since won't prevent rebuilds: build-cross64: setup-cross64 Since the `setup-cross64` file doesn't exist, `build-cross64` will always execute. Instead depend on the stamp file: build-cross64: .stamp-configure-cross64 And now `build-cross64` will only rebuild if needed. * Don't try to list all intermediate files as .SECONDARY dependencies, instead list none at all, which works as if all files were listed as dependencies. * Some targets had to move later in the file, since variables used in dependencies: foo: $(VARIABLE) must be defined before that point in the file, as opposed to variables used in recipes: foo: $(MAKE) $(VARIABLE) can be defined anywhere in the Makefile. * Simplify the targets that sign assemblies significantly. There are a few end results: * It's now possible to do `make install`, without doing `make all` first. This might seem weird, but that also ensures the more common `make all install` works properly. * Remakes (without any mono/llvm changes) in build/ are much faster, because we now won't recurse into every mono build: $ time make all -C builds/ -j8 [...] real 0m1.873s This even means that we might be able to make it a habit to remake in the root directory, which doesn't take forever now: $ time make all -j8 [...] real 0m4.521s Unfortunately adding `make install` to the mix still does some useless stuff, and it ends up taking ~30 seconds to complete a full build: $ time make all install -j8 [...] real 0m32.542s * [msbuild] Don't verify the xml syntax of targets files unless the files change. * [build] Don't depend on installed files. Don't depend on installed files, because that causes a rebuild when installing to a different directory (i.e. package creation). * Bump maccore to get build improvements. Rebuilds are now very fast: $ make all install -j8 $ time make all install -j8 real 0m5.735s Less than 6s to figure out that nothing needs to be done. And strangely flushing the disk cache doesn't make it much slower: $ sudo purge $ time make all install -j8 real 0m7.309s Which probably means that Make mostly reads file metadata, and not actual file contents (which is good).
2017-03-31 21:23:38 +03:00
endef
2016-04-21 14:18:44 +03:00
ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
$(eval $(call iOSCrossTemplate,cross32,llvm32,arm-darwin-mono-sgen,arm-darwin-mono-sgen))
$(eval $(call iOSCrossTemplate,cross64,llvm64,arm64-darwin-mono-sgen,aarch64-darwin-mono-sgen))
$(eval $(call iOSCrossTemplate,crosswatch,llvm32,armv7k-unknown-darwin-mono-sgen,armv7k-unknown-darwin-mono-sgen))
endif
endif