xamarin-macios/builds/Makefile

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

2016-04-21 14:18:44 +03:00
TOP=..
include $(TOP)/Make.config
PREFIX=$(abspath $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/)
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 'mcs/class/*.cs' '*.h' '*.c' '*.cpp' | grep -v "/Test/" | sed 's/ /\\ /g' | sed 's@^\(.*\)$$@ $(MONO_PATH)/\1 \\@' >> $(abspath $@).tmp
$(Q) mv $@.tmp $@
-include .deps.llvm.mk
.deps.llvm.mk: $(TOP)/.git/modules/external/llvm/HEAD
$(Q) printf 'LLVM_DEPENDENCIES += Makefile \\\n' > $@.tmp
$(Q) cd $(LLVM_PATH) && git ls-files | grep -v "^test" | sed 's/ /\\ /g' | sed 's@^\(.*\)$$@ $(LLVM_PATH)/\1 \\@' >> $(abspath $@).tmp
$(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+
COMMON_ACVARS = \
ac_cv_func_fstatat=no \
ac_cv_func_readlinkat=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
##
## 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.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.Runtime.InteropServices.RuntimeInformation \
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 \
$(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) \
define MacBuildTemplate
$(2)_CPPFLAGS = \
-isysroot $(XCODE_MAC_SDKROOT) \
-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)" \
2016-04-21 14:18:44 +03:00
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
DEVELOPER_DIR="$(XCODE_DEVELOPER_ROOT)" \
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)/eglib/src
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))
$(eval $(call MacBuildTemplate,x86_64,mac64))
[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 $$< $$@
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))
[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 $< $@
$(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 $< $@
$(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
$(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)
ifneq ($(WATCH_MONO_PATH),$(MONO_PATH))
2016-05-16 12:04:22 +03:00
$(WATCH_MONO_PATH)/configure: $(WATCH_MONO_PATH)/configure.ac $(BUILDS_MAKEFILE_DEP)
$(Q) ./wrap-autogen.sh $(WATCH_MONO_PATH) mono
endif
2016-05-16 12:04:22 +03:00
2016-04-21 14:18:44 +03:00
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_SDK_VERSION)
TOOLS64_CXXFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_SDK_VERSION)
TOOLS64_LDFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
TOOLS64_CONFIGURE_FLAGS= --build=x86_64-apple-darwin10 \
--with-monotouch_tv=yes \
--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
ifeq ($(WATCH_MONO_PATH),$(MONO_PATH))
TOOLS64_CONFIGURE_FLAGS += --with-monotouch_watch=yes
else
TOOLS64_CONFIGURE_FLAGS += --with-monotouch_watch=no
endif
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_MCS) EXTERNAL_RUNTIME=$(SYSTEM_MONO) MONOTOUCH_MCS_FLAGS=$(IOS_MCS_FLAGS) XAMMAC_MCS_FLAGS=$(MAC_MCS_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_MCS) EXTERNAL_RUNTIME=$(SYSTEM_MONO)
@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
#
# Xamarin.WatchOS BCL assemblies
#
# We need to build the WatchOS BCL using the same mono checkout as we're using for the
# corresponding Mono runtimes, which means we can't use the normal tools64 build
#
# Also we can't reuse the existing watchsimulator/targetwatch builds, since their
# monos don't run (correctly) on desktop OSX.
#
# So we build an entire Mono just to build the WatchOS BCL.
#
WATCHBCL_CFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_SDK_VERSION)
WATCHBCL_CXXFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_SDK_VERSION)
WATCHBCL_LDFLAGS=-arch x86_64 -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) $(COMMON_LDFLAGS)
WATCHBCL_ACVARS = $(COMMON_ACVARS)
2016-05-16 12:04:22 +03:00
WATCHBCL_CONFIGURE_FLAGS= --build=x86_64-apple-darwin10 \
--prefix=$(BUILD_DESTDIR)/watchbcl \
--enable-maintainer-mode \
--cache-file=../watchbcl.config.cache \
--with-glib=embedded \
--enable-minimal=com \
--with-profile2=no \
--with-profile4=no \
--with-profile4_x=no \
--with-profile4_5=no \
--with-monotouch=no \
--with-monotouch_watch=yes \
--with-monotouch_tv=no \
--with-xammac=no \
--with-mcs-docs=no \
--disable-nls \
--disable-iconv \
--disable-boehm \
$(XAMARIN_IOS_CONFIGURE_FLAGS)
2016-05-16 12:04:22 +03:00
WATCHBCL_CONFIGURE_ENVIRONMENT = \
$(WATCHBCL_ACVARS) \
2016-05-16 12:04:22 +03:00
CFLAGS="$(WATCHBCL_CFLAGS)" \
CXXFLAGS="$(WATCHBCL_CXXFLAGS)" \
LDFLAGS="$(WATCHBCL_LDFLAGS)" \
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
ifdef INCLUDE_WATCH
setup:: setup-watchbcl
build:: build-watchbcl
clean-local:: clean-watchbcl
2016-04-21 14:18:44 +03:00
endif
2016-05-16 12:04:22 +03:00
watchbcl: build-watchbcl install-tools-watch
setup-watchbcl: .stamp-configure-watchbcl
ifneq ($(WATCH_MONO_PATH),$(MONO_PATH))
2016-05-16 12:04:22 +03:00
.stamp-configure-watchbcl: $(WATCH_MONO_PATH)/configure
$(Q) $(WATCHBCL_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh watchbcl ../$(WATCH_MONO_PATH)/configure $(WATCHBCL_CONFIGURE_FLAGS)
endif
2016-05-16 12:04:22 +03:00
build-tools-bcl: build-watchbcl
build-tools: build-watchbcl
ifeq ($(WATCH_MONO_PATH),$(MONO_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
.stamp-build-watchbcl: .stamp-build-tools64 $(MONO_DEPENDENCIES)
else
[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-watchbcl: .stamp-configure-watchbcl .stamp-build-tools64 $(MONO_DEPENDENCIES)
2016-05-16 12:04:22 +03:00
$(MAKE) -C watchbcl all EXTERNAL_MCS=$(SYSTEM_MCS) EXTERNAL_RUNTIME=$(SYSTEM_MONO)
$(MAKE) -C watchbcl install EXTERNAL_MCS=$(SYSTEM_MCS) EXTERNAL_RUNTIME=$(SYSTEM_MONO)
endif
2016-05-16 12:04:22 +03:00
$(Q) touch $@
clean-watchbcl:
[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 watchbcl .stamp-*-watchbcl watchbcl.config.cache
2016-05-16 12:04:22 +03:00
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 \
System.Numerics.Vectors System.Reflection.Context System.Reflection.DispatchProxy \
System.Runtime.InteropServices.RuntimeInformation System.Security System.Xml.XPath.XmlDocument \
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/WATCHOS BCL is built from a different mono branch and the assembly list might differ across time
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 $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/Facades | grep dll$$ | sed 's/[.]dll//' | sort > .$@2
2016-05-16 12:04:22 +03:00
$(Q) if ! diff -u .$@1 .$@2; then echo "\n*** There are Facade assemblies in "$(WATCH_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
ifndef IKVM
IOS_BCL_TARGETS += $(PREFIX)/bin/btouch-mono
endif
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
ifndef IKVM
WATCH_BCL_TARGETS += $(PREFIX)/bin/bwatch-mono
endif
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
ifndef IKVM
TVOS_BCL_TARGETS += $(PREFIX)/bin/btv-mono
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
$(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 $< $@
ifndef IKVM
2016-04-21 14:18:44 +03:00
$(PREFIX)/bin/btouch-mono: $(BUILD_DESTDIR)/tools64/bin/mono | $(PREFIX)/bin
$(Q) install -s -m 0755 $< $@
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
$(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 $< $@
ifndef IKVM
2016-04-21 14:18:44 +03:00
$(PREFIX)/bin/btv-mono: $(BUILD_DESTDIR)/tools64/bin/mono | $(PREFIX)/bin
$(Q) install -s -m 0755 $< $@
ifeq ($(WATCH_MONO_PATH),$(MONO_PATH))
$(PREFIX)/bin/bwatch-mono: $(BUILD_DESTDIR)/tools64/bin/mono | $(PREFIX)/bin
else
$(PREFIX)/bin/bwatch-mono: $(BUILD_DESTDIR)/watchbcl/bin/mono | $(PREFIX)/bin
endif
2016-04-21 14:18:44 +03:00
$(Q) install -s -m 0755 $< $@
endif
2016-04-21 14:18:44 +03:00
# 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)
2016-04-21 14:18:44 +03:00
$(Q) cp $< $@
$(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)
2016-04-21 14:18:44 +03:00
$(Q) cp $< $@
[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
#
# usage $(call SimulatorBuildTemplate (x86_64,simulator64))
SIM_BIN=$(SIMULATOR_BIN_PATH)
SIM_ACVARS = \
$(COMMON_ACVARS) \
ac_cv_func_clock_nanosleep=no \
mono_cv_uscore=yes \
2016-04-21 14:18:44 +03:00
define SimulatorBuildTemplate
$(eval SIM$(2)_CPPFLAGS=-arch $(1) -O2 -DMONOTOUCH -DHOST_IOS -Wl,-application_extension -mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(SIMULATOR_SDK))
$(eval SIM$(2)_CFLAGS=$(SIM$(2)_CPPFLAGS) $(SIMULATOR_BUILD_CFLAGS))
$(eval SIM$(2)_CXXFLAGS=$(SIM$(2)_CPPFLAGS))
$(eval SIM$(2)_LDFLAGS=$(COMMON_LDFLAGS))
2016-04-21 14:18:44 +03:00
$(eval SIM$(2)_CONFIGURE_FLAGS= --host=$(1)-apple-darwin10 \
--cache-file=../$(2).config.cache \
--enable-maintainer-mode \
--prefix=$(BUILD_DESTDIR)/$(2) \
--with-glib=embedded \
--without-ikvm-native \
--with-tls=pthread \
2016-04-21 14:18:44 +03:00
--enable-minimal=com,remoting,shared_perfcounters \
--disable-mcs-build \
--disable-nls \
--disable-iconv \
--disable-boehm \
--disable-executables \
--disable-visibility-hidden \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
)
$(eval SIM$(2)_CONFIGURE_ENVIRONMENT= \
$(SIM_ACVARS) \
2016-04-21 14:18:44 +03:00
PATH="$(SIM_BIN):$(PATH)" \
CPPFLAGS="$(SIM$(2)_CPPFLAGS)" \
CFLAGS="$(SIM$(2)_CFLAGS)" \
CXXFLAGS="$(SIM$(2)_CXXFLAGS)" \
LDFLAGS="$(SIM$(2)_LDFLAGS)" \
2016-04-21 14:18:44 +03:00
CC="$(XCODE_CC)" \
CXX="$(XCODE_CXX)")
.PHONY: $(2)
$(2):: build-$(2)
setup:: setup-$(2)
build:: build-$(2)
clean-local:: clean-$(2)
setup-$(2): .stamp-configure-$(2)
.stamp-configure-$(2): $(MONO_PATH)/configure
$(Q) $(SIM$(2)_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh $(2) $(abspath $(MONO_PATH)/configure) $(SIM$(2)_CONFIGURE_FLAGS)
[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) $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
PATH="$(SIM_BIN):$(PATH)" $(MAKE) -C $(2)/eglib all
PATH="$(SIM_BIN):$(PATH)" $(MAKE) -C $(2)/mono all
PATH="$(SIM_BIN):$(PATH)" $(MAKE) -C $(2)/support all
PATH="$(SIM_BIN):$(PATH)" $(MAKE) -C $(2)/eglib install
PATH="$(SIM_BIN):$(PATH)" $(MAKE) -C $(2)/mono install
[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):
[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 $(2) .stamp-*-$(2) $(2).config.cache
2016-04-21 14:18:44 +03:00
setup-iphonesimulator:: setup-$(2)
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)
[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)
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 $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $$@
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))
$(eval $(call SimulatorBuildTemplate,x86_64,simulator64))
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
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 \
$(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 $@
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 $@
$(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 $< $@
$(Q) install_name_tool -id @rpath/Mono.framework/Mono $@
$(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-Info.plist | $(IOS_DESTDIR)$(IPHONESIMULATOR_SDK)/Frameworks/Mono.framework
$(Q) cp $< $@
install-iphonesimulator:: $(IPHONESIMULATOR_TARGETS)
#
# Watch simulator build
#
WATCHSIMULATOR_SDK = $(SIMULATORWATCH_SDK)
2016-04-21 14:18:44 +03:00
WATCHSIMULATOR_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchSimulator.platform/Developer/usr/bin
WATCHSIMULATOR_CC = $(IOS_CC)
WATCHSIMULATOR_FLAGS = \
-isysroot $(WATCHSIMULATOR_SDK) \
-mwatchos-simulator-version-min=$(MIN_WATCHOS_SDK_VERSION) \
-arch i386 \
-O2 \
-gdwarf-2 \
-Wl,-application_extension \
-DMONOTOUCH \
-DHOST_IOS \
-DHOST_WATCHOS \
$(SIMULATOR_BUILD_CFLAGS) \
WATCHSIMULATOR_CPPFLAGS = $(WATCHSIMULATOR_FLAGS)
WATCHSIMULATOR_CFLAGS = $(WATCHSIMULATOR_FLAGS)
WATCHSIMULATOR_CXXFLAGS = $(WATCHSIMULATOR_FLAGS)
WATCHSIMULATOR_LDFLAGS = $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
WATCHSIMULATOR_CONFIGURE_FLAGS = \
--host=i386-apple-darwin10 \
--disable-boehm \
--disable-executables \
--cache-file=../watchsimulator.config.cache \
--enable-maintainer-mode \
--prefix=$(BUILD_DESTDIR)/watchsimulator \
--with-glib=embedded \
--with-cooperative-gc=yes \
--without-ikvm-native \
--with-tls=pthread \
2016-04-21 14:18:44 +03:00
--enable-minimal=com,remoting,shared_perfcounters \
--disable-mcs-build \
--disable-nls \
--disable-iconv \
--disable-visibility-hidden \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
# FIXME: remove --with-checked-build=yes when we've stabilized a bit.
WATCHSIMULATOR_CONFIGURE_FLAGS += \
--enable-checked-build=gc \
2016-04-21 14:18:44 +03:00
WATCHSIMULATOR_ACVARS = \
mono_cv_uscore=yes \
ac_cv_func_clock_nanosleep=no \
2016-04-21 14:18:44 +03:00
ac_cv_func_system=no \
ac_cv_func_pthread_kill=no \
ac_cv_func_kill=no \
ac_cv_func_sigaction=no \
ac_cv_func_fork=no \
ac_cv_func_execv=no \
ac_cv_func_execve=no \
ac_cv_func_execvp=no \
ac_cv_func_signal=no
WATCHSIMULATOR_ENVIRONMENT = \
$(WATCHSIMULATOR_ACVARS) \
PATH="$(WATCHSIMULATOR_BIN_PATH):$(PATH)" \
CC="$(WATCHSIMULATOR_CC)" \
CXX="$(WATCHSIMULATOR_CC)" \
CPPFLAGS="$(WATCHSIMULATOR_CPPFLAGS)" \
CFLAGS="$(WATCHSIMULATOR_CFLAGS)" \
CXXFLAGS="$(WATCHSIMULATOR_CXXFLAGS)" \
LDFLAGS="$(WATCHSIMULATOR_LDFLAGS)" \
2016-04-21 14:18:44 +03:00
DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) \
ifdef INCLUDE_WATCH
setup:: setup-watchsimulator
build:: build-watchsimulator
clean-local:: clean-watchsimulator
install-local:: install-watchsimulator
watchsimulator: build-watchsimulator install-watchsimulator
.PHONY: watchsimulator
endif
setup-watchsimulator: .stamp-configure-watchsimulator
2016-05-16 12:04:22 +03:00
.stamp-configure-watchsimulator: $(WATCH_MONO_PATH)/configure
$(Q) $(WATCHSIMULATOR_ENVIRONMENT) ./wrap-configure.sh watchsimulator $(abspath $(WATCH_MONO_PATH)/configure) $(WATCHSIMULATOR_CONFIGURE_FLAGS)
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
.stamp-build-watchsimulator: export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
.stamp-build-watchsimulator: export PATH:="$(WATCHSIMULATOR_BIN_PATH):$(PATH)"
.stamp-build-watchsimulator: .stamp-configure-watchsimulator $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C watchsimulator/eglib all
$(Q) $(MAKE) -C watchsimulator/mono all
$(Q) $(MAKE) -C watchsimulator/support all
$(Q) $(MAKE) -C watchsimulator/eglib install
$(Q) $(MAKE) -C watchsimulator/mono install
[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:
[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) rm -rf watchsimulator .stamp-*-watchsimulator watchsimulator.config.cache
2016-04-21 14:18:44 +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
2016-04-21 14:18:44 +03:00
WATCHSIMULATOR_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/watchsimulator/lib/libmono-profiler-log.0.dylib
[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
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 \
$(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 $@
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 $(BUILD_DESTDIR)/watchsimulator/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
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 $< $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/Mono.framework/Mono $@
$(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 $< $@
install-watchsimulator: $(WATCHSIMULATOR_TARGETS)
#
# TV simulator build
#
TVSIMULATOR_SDK = $(SIMULATORTV_SDK)
2016-04-21 14:18:44 +03:00
TVSIMULATOR_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Platforms/AppleTVSimulator.platform/Developer/usr/bin
TVSIMULATOR_CC = $(IOS_CC)
TVOS_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin
TVSIMULATOR_FLAGS = \
-isysroot $(TVSIMULATOR_SDK) \
-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION) \
-arch x86_64 \
-O2 \
-gdwarf-2 \
-Wl,-application_extension \
-DMONOTOUCH \
-DHOST_APPLETVOS \
-DTARGET_APPLETVOS \
$(SIMULATOR_BUILD_CFLAGS)
TVSIMULATOR_CPPFLAGS = $(TVSIMULATOR_FLAGS)
TVSIMULATOR_CFLAGS = $(TVSIMULATOR_FLAGS)
TVSIMULATOR_CXXFLAGS = $(TVSIMULATOR_FLAGS)
TVSIMULATOR_LDFLAGS = $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
TVSIMULATOR_CONFIGURE_FLAGS = \
--host=x86_64-apple-darwin10 \
--disable-boehm \
--disable-executables \
--cache-file=../tvsimulator.config.cache \
--enable-maintainer-mode \
--prefix=$(BUILD_DESTDIR)/tvsimulator \
--with-glib=embedded \
--with-cooperative-gc=no \
--without-ikvm-native \
--enable-minimal=com,remoting,shared_perfcounters \
--disable-mcs-build \
--disable-nls \
--disable-iconv \
--with-tls=pthread \
2016-04-21 14:18:44 +03:00
--disable-visibility-hidden \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
TVSIMULATOR_ACVARS = \
mono_cv_uscore=yes \
ac_cv_func_clock_nanosleep=no \
2016-04-21 14:18:44 +03:00
ac_cv_func_system=no \
ac_cv_func_pthread_kill=no \
ac_cv_func_kill=no \
ac_cv_func_sigaction=no \
ac_cv_func_fork=no \
ac_cv_func_execv=no \
ac_cv_func_execve=no \
ac_cv_func_execvp=no \
ac_cv_func_signal=no
TVSIMULATOR_ENVIRONMENT = \
$(TVSIMULATOR_ACVARS) \
PATH="$(TVSIMULATOR_BIN_PATH):$(PATH)" \
CC="$(TVSIMULATOR_CC)" \
CXX="$(TVSIMULATOR_CC)" \
CPPFLAGS="$(TVSIMULATOR_CPPFLAGS)" \
CFLAGS="$(TVSIMULATOR_CFLAGS)" \
CXXFLAGS="$(TVSIMULATOR_CXXFLAGS)" \
LDFLAGS="$(TVSIMULATOR_LDFLAGS)" \
2016-04-21 14:18:44 +03:00
DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) \
ifdef INCLUDE_TVOS
setup:: setup-tvsimulator
build:: build-tvsimulator
clean-local:: clean-tvsimulator
install-local:: install-tvsimulator
tvsimulator: build-tvsimulator install-tvsimulator
.PHONY: tvsimulator
endif
setup-tvsimulator: .stamp-configure-tvsimulator
# for now we re-use the watch mono
.stamp-configure-tvsimulator: $(MONO_PATH)/configure
$(Q) $(TVSIMULATOR_ENVIRONMENT) ./wrap-configure.sh tvsimulator $(abspath $(MONO_PATH)/configure) $(TVSIMULATOR_CONFIGURE_FLAGS)
[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-tvsimulator: export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
.stamp-build-tvsimulator: export PATH:="$(TVSIMULATOR_BIN_PATH):$(PATH)"
.stamp-build-tvsimulator: .stamp-configure-tvsimulator $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C tvsimulator/eglib all
$(Q) $(MAKE) -C tvsimulator/mono all
$(Q) $(MAKE) -C tvsimulator/support all
$(Q) $(MAKE) -C tvsimulator/eglib install
$(Q) $(MAKE) -C tvsimulator/mono install
[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:
[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) rm -rf tvsimulator .stamp-*-tvsimulator tvsimulator.config.cache
2016-04-21 14:18:44 +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
2016-04-21 14:18:44 +03:00
TVSIMULATOR_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/tvsimulator/lib/libmono-profiler-log.0.dylib
[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
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 \
$(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 $@
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 $(BUILD_DESTDIR)/tvsimulator/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
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 $< $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/Mono.framework/Mono $@
$(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 $< $@
install-tvsimulator: $(TVSIMULATOR_TARGETS)
#
# 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 PlatformBuildTemplate (armv7,target7,<platform suffix>,<configure flags>,<unused>))
define PlatformBuildTemplate
# $(4) contains the architecture specific configure flags
# $(5) is unused
# $(6) contains min ios version
# Avoid passing the -arch flag twice in CFLAGS since it disables ccache
$(eval $(2)_BASE_CPPFLAGS=-DSMALL_CONFIG -DDISABLE_POLICY_EVIDENCE=1 -DDISABLE_PROCESS_HANDLING=1 -D_XOPEN_SOURCE -DMONOTOUCH=1 -DHOST_IOS -DHAVE_LARGE_FILE_SUPPORT=1 -Wl,-application_extension -miphoneos-version-min=$(6) -isysroot $(PLATFORM_SDK))
$(eval $(2)_CPPFLAGS=$($(2)_BASE_CPPFLAGS) -arch $(1))
$(eval $(2)_CFLAGS=-O2 -gdwarf-2 $($(2)_BASE_CPPFLAGS) $(DEVICE_BUILD_CFLAGS) $(IOS_BITCODE_CFLAGS))
$(eval $(2)_CXXFLAGS=$($(2)_CPPFLAGS) $(IOS_BITCODE_CXXFLAGS))
$(eval $(2)_LDFLAGS=-arch $(1) $(IOS_BITCODE_LDFLAGS) $(COMMON_LDFLAGS))
2016-04-21 14:18:44 +03:00
$(eval $(2)_CONFIGURE_FLAGS=--build=i386-apple-darwin10 \
$(4) \
--enable-maintainer-mode \
--cache-file=../$(2).config.cache \
--prefix=$(BUILD_DESTDIR)/$(2) \
--with-monotouch \
--with-lazy-gc-thread-creation=yes \
--disable-mcs-build \
--enable-minimal=ssa,com,jit,reflection_emit_save,reflection_emit,portability,assembly_remapping,attach,verifier,full_messages,appdomains,security,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,remoting,shared_perfcounters \
--without-ikvm-native \
--with-tls=pthread \
--without-sigaltstack \
--enable-icall-export \
--disable-icall-tables \
--disable-executables \
--disable-nls \
--disable-iconv \
--disable-visibility-hidden \
--disable-boehm \
--enable-dtrace=no \
$(IOS_BITCODE_CONFIGURE_FLAGS) \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
)
$(eval $(2)_ACVARS= mono_cv_uscore=yes \
mono_cv_sizeof_sunpath=104 \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_finite=no \
ac_cv_c_bigendian=no \
ac_cv_header_sys_user_h=no \
ac_cv_header_curses_h=no \
ac_cv_header_localcharset_h=no \
ac_cv_func_getpwuid_r=no)
$(eval $(2)_CONFIGURE_ENVIRONMENT = \
PATH="$(PLATFORM$(3)_BIN):$(PATH)" \
CPPFLAGS="$($(2)_CPPFLAGS)" \
CFLAGS="$($(2)_CFLAGS)" \
CXXFLAGS="$($(2)_CXXFLAGS)" \
LDFLAGS="$($(2)_LDFLAGS)" \
CC="$(DEVICE_CC)" \
CXX="$(DEVICE_CXX)")
.PHONY: $(2)
$(2): build-$(2)
setup:: setup-$(2)
build:: build-$(2)
clean-local:: clean-$(2)
setup-$(2): .stamp-configure-$(2)
.stamp-configure-$(2): $(MONO_PATH)/configure
$(Q) $($(2)_ACVARS) $($(2)_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh $(2) $(abspath $(MONO_PATH)/configure) $($(2)_CONFIGURE_FLAGS)
[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) $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
PATH="$(PLATFORM_BIN):$(PATH)" $(MAKE) -C $(2)/eglib
PATH="$(PLATFORM_BIN):$(PATH)" $(MAKE) -C $(2)/mono
PATH="$(PLATFORM_BIN):$(PATH)" $(MAKE) -C $(2)/eglib install
PATH="$(PLATFORM_BIN):$(PATH)" $(MAKE) -C $(2)/mono install
[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):
[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 $(2) .stamp-*-$(2) $(2).config.cache
2016-04-21 14:18:44 +03:00
setup-iphoneos:: setup-$(2)
build-iphoneos:: build-$(2)
clean-iphoneos:: clean-$(2)
build-ios: build-iphoneos
clean-ios: clean-iphoneos
setup-ios: setup-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_SHAREDLIBLOGPROFILER:=$(TARGET_SHAREDLIBLOGPROFILER) $(BUILD_DESTDIR)/$(2)/tmp-lib/libmono-profiler-log.0.dylib)
$(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-profiler-log.a: .stamp-build-$(2)
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) rm -Rf $$@.tmpdir
$$(Q) mkdir -p $$@.tmpdir
$$(Q) cd $$@.tmpdir && ar -x $$<
$$(Q) $$(IOS_CC) -arch $(1) -dynamiclib -o $$@ $$@.tmpdir/*.o -liconv -O2 -Wl,-application_extension -miphoneos-version-min=8.0 -isysroot $(PLATFORM_SDK) -install_name @rpath/Mono.framework/Mono -compatibility_version 2 -current_version 2.0 -framework CoreFoundation -lobjc $(IOS_BITCODE_LDFLAGS) -Wl,-single_module
$$(Q) rm -Rf $$@.tmpdir
$(BUILD_DESTDIR)/$(2)/tmp-lib/libmonosgen-2.0.dylib: $(BUILD_DESTDIR)/$(2)/lib/libmonosgen-2.0.a | $(BUILD_DESTDIR)/$(2)/tmp-lib
$$(Q) rm -Rf $$@.tmpdir
$$(Q) mkdir -p $$@.tmpdir
$$(Q) cd $$@.tmpdir && ar -x $$<
$$(Q) $$(IOS_CC) -arch $(1) -dynamiclib -o $$@ $$@.tmpdir/*.o -liconv -O2 -Wl,-application_extension -miphoneos-version-min=7.0 -isysroot $(PLATFORM_SDK) -install_name @rpath/libmonosgen-2.0.dylib -compatibility_version 2 -current_version 2.0 -framework CoreFoundation -lobjc $(IOS_BITCODE_LDFLAGS) -Wl,-single_module
2016-04-21 14:18:44 +03:00
$$(Q) rm -Rf $$@.tmpdir
$(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) rm -Rf $$@.tmpdir
$$(Q) mkdir -p $$@.tmpdir
$$(Q) cd $$@.tmpdir && ar -x $$<
$$(Q) $$(IOS_CC) -arch $(1) -dynamiclib -o $$@ $$@.tmpdir/*.o -liconv -O2 -Wl,-application_extension -miphoneos-version-min=7.0 -isysroot $(PLATFORM_SDK) -install_name @rpath/libmono-profiler-log.dylib -compatibility_version 2 -current_version 2.0 -framework CoreFoundation -lobjc -Wl,-single_module -L$(BUILD_DESTDIR)/$(2)/tmp-lib -lmonosgen-2.0 -lz
2016-04-21 14:18:44 +03:00
$$(Q) rm -Rf $$@.tmpdir
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 PlatformBuildTemplate,armv7,target7,,$(ARM_ARCH_CONFIGURE_FLAGS),,$(MIN_IOS_SDK_VERSION)))
endif
ifneq ($(findstring armv7s , $(DEVICE_RUNTIMES) ),)
$(eval $(call PlatformBuildTemplate,armv7s,target7s,,$(ARM_ARCH_CONFIGURE_FLAGS),,$(MIN_IOS_SDK_VERSION)))
endif
ifneq ($(findstring arm64 , $(DEVICE_RUNTIMES) ),)
$(eval $(call PlatformBuildTemplate,arm64,target64,,$(ARM64_ARCH_CONFIGURE_FLAGS),,7.0))
endif
ifdef INCLUDE_DEVICE
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.
ifdef INCLUDE_IOS
install-local:: install-iphoneos
endif
endif
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 \
$(LIBMONO_PROFILER_IPHONEOS_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 $@
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-profiler-log.dylib: $(TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib
$(Q) lipo $(TARGET_SHAREDLIBLOGPROFILER) -create -output $@
$(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 $@
$(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-Info.plist | $(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework
$(Q) cp $< $@
install-iphoneos:: $(IPHONEOS_TARGETS)
#
# 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
WATCHOS_CC = $(IOS_CC)
WATCHOS_FLAGS = \
-isysroot $(WATCHOS_SDK) \
-mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) \
-arch armv7k \
-O2 \
-gdwarf-2 \
-Wl,-application_extension \
-fembed-bitcode \
-fno-gnu-inline-asm \
-DMONOTOUCH=1 \
-DHOST_IOS \
-DHOST_WATCHOS \
-DSMALL_CONFIG \
-DDISABLE_POLICY_EVIDENCE=1 \
-DDISABLE_PROCESS_HANDLING=1 \
-D_XOPEN_SOURCE \
-DHAVE_LARGE_FILE_SUPPORT=1 \
$(DEVICE_BUILD_CFLAGS) \
$(BITCODE_CFLAGS)
2016-04-21 14:18:44 +03:00
WATCHOS_CPPFLAGS = $(WATCHOS_FLAGS)
WATCHOS_CFLAGS = $(WATCHOS_FLAGS)
WATCHOS_CXXFLAGS = $(WATCHOS_FLAGS)
WATCHOS_LDFLAGS = -arch armv7k -Wl,-bitcode_bundle -framework CoreFoundation -lobjc $(BITCODE_LDFLAGS) $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
WATCHOS_CONFIGURE_FLAGS = \
--build=i386-apple-darwin10 \
--host=armv7k-apple-darwin10 \
--enable-maintainer-mode \
--cache-file=../targetwatch.config.cache \
--prefix=$(BUILD_DESTDIR)/targetwatch \
--with-cooperative-gc=yes \
--with-monotouch \
--with-lazy-gc-thread-creation=yes \
--disable-mcs-build \
--disable-boehm \
--enable-minimal=ssa,com,jit,reflection_emit_save,reflection_emit,portability,assembly_remapping,attach,verifier,full_messages,appdomains,security,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,remoting,shared_perfcounters \
--without-ikvm-native \
--with-tls=pthread \
--without-sigaltstack \
--enable-icall-export \
--disable-icall-tables \
--disable-executables \
--disable-nls \
--disable-iconv \
--disable-visibility-hidden \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
$(BITCODE_CONFIGURE_FLAGS)
2016-04-21 14:18:44 +03:00
WATCHOS_ACVARS = \
mono_cv_uscore=yes \
mono_cv_sizeof_sunpath=104 \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_finite=no \
ac_cv_c_bigendian=no \
ac_cv_header_sys_user_h=no \
ac_cv_header_curses_h=no \
ac_cv_header_localcharset_h=no \
ac_cv_func_getpwuid_r=no \
ac_cv_func_system=no \
ac_cv_func_pthread_kill=no \
ac_cv_func_kill=no \
ac_cv_func_sigaction=no \
ac_cv_func_fork=no \
ac_cv_func_execv=no \
ac_cv_func_execve=no \
ac_cv_func_execvp=no \
ac_cv_func_signal=no
WATCHOS_ENVIRONMENT = \
$(WATCHOS_ACVARS) \
PATH="$(WATCHOS_BIN_PATH):$(PATH)" \
CFLAGS="$(WATCHOS_CFLAGS)" \
CPPFLAGS="$(WATCHOS_CPPFLAGS)" \
CXXFLAGS="$(WATCHOS_CXXFLAGS)" \
LDFLAGS="$(WATCHOS_LDFLAGS)" \
CC="$(WATCHOS_CC)" \
CXX="$(WATCHOS_CC)" \
DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) \
ifdef INCLUDE_WATCH
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
setup:: setup-targetwatch
build:: build-targetwatch
clean-local:: clean-targetwatch
install-local:: install-watchos
targetwatch: build-targetwatch install-watchos
watchos:: targetwatch
.PHONY: targetwatch
endif
endif
2016-04-21 14:18:44 +03:00
setup-targetwatch: .stamp-configure-targetwatch
2016-05-16 12:04:22 +03:00
.stamp-configure-targetwatch: $(WATCH_MONO_PATH)/configure
$(Q) $(WATCHOS_ENVIRONMENT) ./wrap-configure.sh targetwatch $(abspath $(WATCH_MONO_PATH)/configure) $(WATCHOS_CONFIGURE_FLAGS)
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
.stamp-build-targetwatch: export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
.stamp-build-targetwatch: export PATH:="$(WATCHOS_BIN_PATH):$(PATH)"
.stamp-build-targetwatch: .stamp-configure-targetwatch $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C targetwatch/eglib
$(Q) $(MAKE) -C targetwatch/mono
$(Q) $(MAKE) -C targetwatch/eglib install
$(Q) $(MAKE) -C targetwatch/mono install
[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:
[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) rm -rf targetwatch .stamp-*-targetwatch targetwatch.config.cache
2016-04-21 14:18:44 +03:00
setup-watchos: setup-targetwatch
build-watchos: build-targetwatch
clean-watchos: clean-targetwatch
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
2016-04-21 14:18:44 +03:00
WATCHOS_TARGET_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log.0.dylib
[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_SHAREDLIBLOGPROFILER): .stamp-build-targetwatch
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)/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 $@
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-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 $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
2016-04-21 14:18:44 +03:00
$(WATCHOS_DIRECTORIES):
$(Q) mkdir -p $@
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
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Mono: $(WATCHOS_TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework
2016-04-21 14:18:44 +03:00
$(Q) cp $< $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/Mono.framework/Mono -change $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
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 $< $@
install-watchos: $(WATCHOS_TARGETS)
#
# TV device build
#
TVOS_SDK = $(DEVICETV_SDK)
2016-04-21 14:18:44 +03:00
TVOS_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin
TVOS_CC = $(IOS_CC)
TVOS_FLAGS = \
-isysroot $(TVOS_SDK) \
-mtvos-version-min=$(MIN_TVOS_SDK_VERSION) \
-arch arm64 \
-O2 \
-gdwarf-2 \
-Wl,-application_extension \
-fembed-bitcode \
-fno-gnu-inline-asm \
-DMONOTOUCH=1 \
-DHOST_APPLETVOS \
-DTARGET_APPLETVOS \
-DSMALL_CONFIG \
-DDISABLE_PROCESS_HANDLING=1 \
-DDISABLE_POLICY_EVIDENCE=1 \
-D_XOPEN_SOURCE \
-DHAVE_LARGE_FILE_SUPPORT=1 \
$(BITCODE_CFLAGS) \
$(DEVICE_BUILD_CFLAGS) \
TVOS_CPPFLAGS = $(TVOS_FLAGS)
TVOS_CFLAGS = $(TVOS_FLAGS) $(DEVICE_BUILD_CFLAGS)
TVOS_CXXFLAGS = $(TVOS_FLAGS)
TVOS_LDFLAGS = -arch arm64 -Wl,-bitcode_bundle -framework CoreFoundation -lobjc $(BITCODE_LDFLAGS) $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
TVOS_CONFIGURE_FLAGS = \
--build=x86_64-apple-darwin10 \
--host=aarch64-apple-darwin10 \
--enable-maintainer-mode \
--cache-file=../targettv.config.cache \
--prefix=$(BUILD_DESTDIR)/targettv \
--with-cooperative-gc=no \
--with-monotouch \
--with-lazy-gc-thread-creation=yes \
--disable-mcs-build \
--disable-boehm \
--enable-minimal=ssa,com,jit,reflection_emit_save,reflection_emit,portability,assembly_remapping,attach,verifier,full_messages,appdomains,security,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,remoting,shared_perfcounters \
--without-ikvm-native \
--with-tls=pthread \
--without-sigaltstack \
--enable-icall-export \
--disable-icall-tables \
--disable-executables \
--disable-nls \
--disable-iconv \
--disable-visibility-hidden \
--enable-extension-module \
--enable-dtrace=no \
$(XAMARIN_IOS_CONFIGURE_FLAGS) \
2016-04-21 14:18:44 +03:00
$(BITCODE_CONFIGURE_FLAGS) \
# explicitly disable dtrace, since it requires inline assembly, which is disabled on AppleTV (and mono's configure.ac doesn't know that (yet at least))
TVOS_ACVARS = \
mono_cv_uscore=yes \
mono_cv_sizeof_sunpath=104 \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_finite=no \
ac_cv_c_bigendian=no \
ac_cv_header_sys_user_h=no \
ac_cv_header_curses_h=no \
ac_cv_header_localcharset_h=no \
ac_cv_func_getpwuid_r=no \
ac_cv_func_system=no \
ac_cv_func_pthread_kill=no \
ac_cv_func_kill=no \
ac_cv_func_sigaction=no \
ac_cv_func_fork=no \
ac_cv_func_execv=no \
ac_cv_func_execve=no \
ac_cv_func_execvp=no \
ac_cv_func_signal=no
TVOS_ENVIRONMENT = \
$(TVOS_ACVARS) \
PATH="$(TVOS_BIN_PATH):$(PATH)" \
CFLAGS="$(TVOS_CFLAGS)" \
CPPFLAGS="$(TVOS_CPPFLAGS)" \
CXXFLAGS="$(TVOS_CXXFLAGS)" \
LDFLAGS="$(TVOS_LDFLAGS)" \
CC="$(TVOS_CC)" \
CXX="$(TVOS_CC)" \
DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) \
ifdef INCLUDE_TVOS
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
setup:: setup-targettv
build:: build-targettv
clean-local:: clean-targettv
install-local:: install-tvos
targettv: build-targettv install-tvos
tvos:: targettv
.PHONY: targettv
endif
endif
2016-04-21 14:18:44 +03:00
setup-targettv: .stamp-configure-targettv
.stamp-configure-targettv: $(MONO_PATH)/configure
$(Q) $(TVOS_ENVIRONMENT) ./wrap-configure.sh targettv $(abspath $(MONO_PATH)/configure) $(TVOS_CONFIGURE_FLAGS)
[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-targettv: export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
.stamp-build-targettv: export PATH:="$(TVOS_BIN_PATH):$(PATH)"
.stamp-build-targettv: .stamp-configure-targettv $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C targettv/eglib
$(Q) $(MAKE) -C targettv/mono
$(Q) $(MAKE) -C targettv/eglib install
$(Q) $(MAKE) -C targettv/mono install
[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:
[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) rm -rf targettv .stamp-*-targettv targettv.config.cache
2016-04-21 14:18:44 +03:00
setup-tvos: setup-targettv
build-tvos: build-targettv
clean-tvos: clean-targettv
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
2016-04-21 14:18:44 +03:00
TVOS_TARGET_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/targettv/lib/libmono-profiler-log.0.dylib
[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_SHAREDLIBLOGPROFILER): .stamp-build-targettv
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)/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 $@
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-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 $(BUILD_DESTDIR)/targettv/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
2016-04-21 14:18:44 +03:00
$(TVOS_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework/Mono: $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/usr/lib/libmonosgen-2.0.dylib | $(IOS_DESTDIR)$(XAMARIN_TVOS_SDK)/Frameworks/Mono.framework
$(Q) cp $< $@
$(Q) $(TVOS_BIN_PATH)/install_name_tool -id @rpath/Mono.framework/Mono $@
$(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 $< $@
install-tvos: $(TVOS_TARGETS)
#
# this is the cross aot version of mono. runs on x86 but the jit/aot spits out arm.
#
# There are two versions of the cross compiler, a 32 bit version targeting arm, and a 64
# bit version targeting arm64.
#
#
# we need to compile the cross build against llvm so we need to configure/build that first
#
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
cross:: build-llvm
cross64:: build-llvm64
setup:: setup-llvm setup-llvm64
clean-local:: clean-llvm clean-llvm64
setup-llvm: .stamp-configure-llvm
setup-llvm64: .stamp-configure-llvm64
endif
2016-04-21 14:18:44 +03:00
LLVM_BASE_CONFIGURE_FLAGS=--enable-libcpp --enable-optimized --enable-assertions=no --disable-jit --disable-docs --disable-doxygen
LLVM_CXXFLAGS=$(CCACHE_CXXFLAGS)
# This is used just for linking with the 32 bit cross compiler
# FIXME: Avoid building the libs not needed by mono
.stamp-configure-llvm: $(LLVM_PATH)/configure
@mkdir -p llvm/
@echo "Configuring llvm"
@cd llvm && \
$(abspath $(LLVM_PATH)/configure) --prefix=$$PWD/usr --build=i386-apple-darwin10.7 --enable-targets="arm" $(LLVM_BASE_CONFIGURE_FLAGS) --cache-file=../llvm.config.cache CC="$(CCACHE)clang" CXX="$(CCACHE)clang++" CXXFLAGS="$(LLVM_CXXFLAGS)" > $@.log 2>&1 || (echo "Configuring llvm failed:" && cat $@.log | sed "s/^/ /" && exit 1)
$(Q) @touch $@
@echo Configured llvm
.stamp-configure-llvm64: $(LLVM_PATH)/configure
@mkdir -p llvm64/
@echo "Configuring llvm64"
@cd llvm64 && \
$(abspath $(LLVM_PATH)/configure) --prefix=$$PWD/usr --enable-targets="arm arm64" $(LLVM_BASE_CONFIGURE_FLAGS) --cache-file=../llvm64.config.cache CC="$(CCACHE)clang" CXX="$(CCACHE)clang++" CXXFLAGS="-Qunused-arguments" > $@.log 2>&1 || (echo "Configuring llvm64 failed:" && cat $@.log | sed "s/^/ /" && exit 1)
$(Q) @touch $@
@echo "Configured llvm64"
build-llvm: .stamp-build-llvm
build-llvm64: .stamp-build-llvm64
[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-llvm: .stamp-configure-llvm $(LLVM_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(MAKE) -C llvm all install
$(Q) touch $@
[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-llvm64: .stamp-configure-llvm64 $(LLVM_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(MAKE) -C llvm64 all install
$(Q) touch $@
really-build-llvm64:
$(MAKE) -C llvm64 all install
$(Q) touch .stamp-configure-llvm64
clean-llvm:
-rm -rf llvm .stamp-configure-llvm .stamp-build-llvm llvm.config.cache
clean-llvm64:
-rm -rf llvm64 .stamp-configure-llvm64 .stamp-build-llvm64 llvm64.config.cache
.PHONY: install-llvm64 llvm llvm64
install-llvm: .stamp-build-llvm install-directories
LLVM_TARGETS = \
$(PREFIX)/LLVM/bin/opt \
$(PREFIX)/LLVM/bin/llc \
$(PREFIX)/LLVM/bin/%: llvm64/usr/bin/% | $(PREFIX)/LLVM/bin
$(call Q_2,INSTALL ,[LLVM64]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@
$(PREFIX)/LLVM/bin:
$(Q) mkdir -p $@
install-llvm64: .stamp-build-llvm64 $(LLVM_TARGETS)
llvm: setup-llvm build-llvm install-llvm
llvm64: install-llvm64
$(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe: $(wildcard $(MONO_PATH)/tools/offsets-tool/*.cs)
$(Q) $(MAKE) -C $(dir $@) MonoAotOffsetsDumper.exe
ifneq ($(WATCH_MONO_PATH),$(MONO_PATH))
$(WATCH_MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe: $(wildcard $(WATCH_MONO_PATH)/tools/offsets-tool/*.cs)
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C $(dir $@) MonoAotOffsetsDumper.exe
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
target7/mono/arch/arm/arm_dpimacros.h: .stamp-configure-target7
2016-04-21 14:18:44 +03:00
$(Q) $(MAKE) -C $(dir $@) $(notdir $@)
[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 $@)
# template definition for generating AOT cross offsets for an ABI
# parameters are:
# $(1): target ABI
# $(2): output directory
# $(3): build
define GenerateCrossOffsets
$(3)/$(1).h: .stamp-configure-$(3) target7/mono/arch/arm/arm_dpimacros.h targetwatch/mono/arch/arm/arm_dpimacros.h $(4)/tools/offsets-tool/MonoAotOffsetsDumper.exe
$(Q) MONO_PATH=$(4)/tools/offsets-tool/CppSharp/osx_32 \
$(SYSTEM_MONO) $(4)/tools/offsets-tool/MonoAotOffsetsDumper.exe --abi $(1) --out $(2) --mono $(abspath $(4)) --maccore $(abspath $(TOP))
2016-04-21 14:18:44 +03:00
endef
CROSS_BASE_CFLAGS=-DMONOTOUCH $(CROSS_BUILD_CFLAGS) $(CCACHE_CFLAGS)
CROSS_BASE_CXXFLAGS=-DMONOTOUCH $(CCACHE_CXXFLAGS)
CROSS_BASE_CONFIGURE_FLAGS= \
--with-glib=embedded \
--enable-minimal=com,remoting \
--disable-mcs-build \
--enable-llvm \
--enable-icall-symbol-map \
--disable-nls \
--disable-iconv \
--disable-libraries \
--disable-boehm \
$(XAMARIN_IOS_CONFIGURE_FLAGS)
2016-04-21 14:18:44 +03:00
#
# 32 bit cross compiler
#
# mono's configure already adds an -arch i386 flag, and cache doesn't like duplicate -arch flags
CROSS_CFLAGS=$(CROSS_BASE_CFLAGS) -mmacosx-version-min=$(MIN_OSX_SDK_VERSION)
CROSS_CXXFLAGS=$(CROSS_BASE_CXXFLAGS) -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -stdlib=libc++
CROSS_LDFLAGS=-stdlib=libc++ $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
CROSS_CONFIGURE_FLAGS=$(CROSS_BASE_CONFIGURE_FLAGS) \
--prefix=$(BUILD_DESTDIR)/cross \
--build=i386-apple-darwin10 \
--cache-file=../cross.config.cache \
--target=arm-darwin \
--with-cross-offsets=arm-apple-darwin10.h \
--with-llvm=../llvm/usr
2016-04-21 14:18:44 +03:00
CROSS_CONFIGURE_ENVIRONMENT = \
CFLAGS="$(CROSS_CFLAGS)" \
CXXFLAGS="$(CROSS_CXXFLAGS)" \
LDFLAGS="$(CROSS_LDFLAGS)" \
2016-04-21 14:18:44 +03:00
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
cross:: build-cross install-cross
.PHONY: setup-cross build-cross install-cross
setup:: setup-cross
build:: build-cross
install-local:: install-cross
clean-local:: clean-cross
endif
endif
2016-04-21 14:18:44 +03:00
setup-cross: .stamp-configure-cross
.stamp-configure-cross: $(MONO_PATH)/configure .stamp-build-llvm
$(Q) $(CROSS_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh cross $(abspath $(MONO_PATH)/configure) $(CROSS_CONFIGURE_FLAGS)
$(eval $(call GenerateCrossOffsets,arm-apple-darwin10,$(TOP)/builds/cross/,cross,$(MONO_PATH)))
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
.stamp-build-cross: .stamp-configure-cross cross/arm-apple-darwin10.h $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(MAKE) -C cross/eglib
$(MAKE) -C cross/mono
$(MAKE) -C cross/mono install
[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-cross: .stamp-build-cross
2016-04-21 14:18:44 +03:00
CROSS_TARGETS = \
$(PREFIX)/bin/arm-darwin-mono-sgen \
[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)/cross/bin/arm-darwin-mono-sgen: .stamp-build-cross
$(PREFIX)/bin/arm-darwin-mono-sgen: $(BUILD_DESTDIR)/cross/bin/arm-darwin-mono-sgen | $(PREFIX)/bin
2016-04-21 14:18:44 +03:00
$(call Q_2,INSTALL ,[CROSS]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $< $@
$(PREFIX)/bin:
$(Q) mkdir -p $@
install-cross: install-llvm64 $(CROSS_TARGETS)
clean-cross:
-rm -rf cross .stamp-configure-cross cross.config.cache
#
# 64 bit cross compiler
#
CROSS64_CFLAGS=$(CROSS_BASE_CFLAGS) -mmacosx-version-min=10.8
CROSS64_CXXFLAGS=$(CROSS_BASE_CXXFLAGS) -mmacosx-version-min=10.8 -stdlib=libc++
CROSS64_LDFLAGS=-stdlib=libc++ $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
CROSS64_CONFIGURE_FLAGS=$(CROSS_BASE_CONFIGURE_FLAGS) \
--prefix=$(BUILD_DESTDIR)/cross64 \
--cache-file=../cross64.config.cache \
--target=aarch64-darwin \
--with-cross-offsets=aarch64-apple-darwin10.h \
--with-llvm=../llvm64/usr
2016-04-21 14:18:44 +03:00
CROSS64_CONFIGURE_ENVIRONMENT = \
CFLAGS="$(CROSS64_CFLAGS)" \
CXXFLAGS="$(CROSS64_CXXFLAGS)" \
LDFLAGS="$(CROSS64_LDFLAGS)" \
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
cross64:: build-cross64 install-cross64
ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
setup:: setup-cross64
build:: build-cross64
install-local:: install-cross64
clean-local:: clean-cross64
endif
endif
2016-04-21 14:18:44 +03:00
setup-cross64: .stamp-configure-cross64
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
install -d $(PREFIX)/LLVM/bin
.stamp-configure-cross64: $(MONO_PATH)/configure .stamp-build-llvm64
$(Q) $(CROSS64_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh cross64 $(abspath $(MONO_PATH)/configure) $(CROSS64_CONFIGURE_FLAGS)
$(eval $(call GenerateCrossOffsets,aarch64-apple-darwin10,$(TOP)/builds/cross64/,cross64,$(MONO_PATH)))
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
.stamp-build-cross64: .stamp-configure-cross64 cross64/aarch64-apple-darwin10.h $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(MAKE) -C cross64/eglib
$(MAKE) -C cross64/mono
@$(MAKE) -C cross64/mono install
[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-cross64: .stamp-build-cross64
2016-04-21 14:18:44 +03:00
CROSS64_TARGETS = \
$(PREFIX)/bin/arm64-darwin-mono-sgen \
[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)/cross64/bin/aarch64-darwin-mono-sgen: .stamp-build-cross64
2016-04-21 14:18:44 +03:00
$(PREFIX)/bin/arm64-darwin-mono-sgen: $(BUILD_DESTDIR)/cross64/bin/aarch64-darwin-mono-sgen | $(PREFIX)/bin
$(call Q_2,INSTALL ,[CROSS64]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $< $@
install-cross64: install-llvm64 $(CROSS64_TARGETS)
clean-cross64:
[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 cross64 .stamp-*-cross64 cross64.config.cache
2016-04-21 14:18:44 +03:00
#
# 32 bit watch cross compiler
#
WATCH_CROSS_CONFIGURE_FLAGS=$(CROSS_BASE_CONFIGURE_FLAGS) \
--prefix=$(BUILD_DESTDIR)/cross-watch \
--build=i386-apple-darwin10 \
--cache-file=../cross-watch.config.cache \
--target=armv7k-unknown-darwin \
--with-cooperative-gc=yes \
--with-cross-offsets=armv7k-apple-darwin.h \
--with-llvm=../llvm/usr
2016-04-21 14:18:44 +03:00
WATCH_CONFIGURE_ENVIRONMENT = \
CFLAGS="$(CROSS_CFLAGS)" \
CXXFLAGS="$(CROSS_CXXFLAGS)" \
LDFLAGS="$(CROSS_LDFLAGS)" \
2016-04-21 14:18:44 +03:00
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
ifdef INCLUDE_WATCH
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
cross:: build-cross-watch install-cross-watch
.PHONY: setup-cross-watch build-cross-watch install-cross-watch
setup:: setup-cross-watch
build:: build-cross-watch
install-local:: install-cross-watch
clean-local:: clean-cross-watch
endif
endif
2016-04-21 14:18:44 +03:00
.PHONY: cross-watch
cross-watch: build-cross-watch install-cross-watch
setup-cross-watch: .stamp-configure-cross-watch
2016-05-16 12:04:22 +03:00
.stamp-configure-cross-watch: $(WATCH_MONO_PATH)/configure .stamp-build-llvm
$(Q) $(WATCH_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh cross-watch $(abspath $(WATCH_MONO_PATH)/configure) $(WATCH_CROSS_CONFIGURE_FLAGS)
2016-04-21 14:18:44 +03:00
build-cross: setup-cross
$(eval $(call GenerateCrossOffsets,armv7k-apple-darwin,$(TOP)/builds/cross-watch/,cross-watch,$(WATCH_MONO_PATH)))
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
.stamp-build-cross-watch: .stamp-configure-cross-watch cross-watch/armv7k-apple-darwin.h $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(MAKE) -C cross-watch/eglib
$(MAKE) -C cross-watch/mono
$(MAKE) -C cross-watch/mono install
[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-cross-watch: .stamp-build-cross-watch
2016-04-21 14:18:44 +03:00
CROSS_WATCH_TARGETS = \
$(PREFIX)/bin/armv7k-unknown-darwin-mono-sgen \
[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)/cross-watch/bin/armv7k-unknown-darwin-mono-sgen: .stamp-build-cross-watch
$(PREFIX)/bin/armv7k-unknown-darwin-mono-sgen: $(BUILD_DESTDIR)/cross-watch/bin/armv7k-unknown-darwin-mono-sgen | $(PREFIX)/bin
2016-04-21 14:18:44 +03:00
$(call Q_2,INSTALL ,[CROSS]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $< $@
install-cross-watch: install-llvm $(CROSS_WATCH_TARGETS)
clean-cross-watch:
-rm -rf cross-watch .stamp-configure-cross-watch cross-watch.config.cache
#
# 64 bit tv cross compiler
#
TV_CROSS_CFLAGS=$(CROSS_BASE_CFLAGS) -mmacosx-version-min=10.8
TV_CROSS_CXXFLAGS=$(CROSS_BASE_CXXFLAGS) -mmacosx-version-min=10.8 -stdlib=libc++
TV_CROSS_LDFLAGS=-stdlib=libc++ $(COMMON_LDFLAGS)
2016-04-21 14:18:44 +03:00
TV_CROSS_CONFIGURE_FLAGS=$(CROSS_BASE_CONFIGURE_FLAGS) \
--prefix=$(BUILD_DESTDIR)/crosstv \
--cache-file=../crosstv.config.cache \
--target=aarch64-unknown-darwin \
--with-llvm=../llvm64/usr
2016-04-21 14:18:44 +03:00
TV_CROSS_CONFIGURE_ENVIRONMENT = \
$(Q) CFLAGS="$(TV_CROSS_CFLAGS)" \
2016-04-21 14:18:44 +03:00
CXXFLAGS="$(TV_CROSS_CXXFLAGS)" \
LDFLAGS="$(TV_CROSS_LDFLAGS)" \
2016-04-21 14:18:44 +03:00
CC="$(MAC_CC)" \
CXX="$(MAC_CXX)" \
ifdef INCLUDE_TVOS
ifdef INCLUDE_DEVICE
2016-04-21 14:18:44 +03:00
cross:: build-crosstv install-crosstv
.PHONY: setup-crosstv build-crosstv install-crosstv
setup:: setup-crosstv
build:: build-crosstv
install-local:: install-crosstv
clean-local:: clean-crosstv
endif
endif
2016-04-21 14:18:44 +03:00
setup-crosstv: .stamp-configure-crosstv
.stamp-configure-crosstv: $(MONO_PATH)/configure .stamp-build-llvm64
$(Q) $(TV_CROSS_CONFIGURE_ENVIRONMENT) ./wrap-configure.sh crosstv $(abspath $(MONO_PATH)/configure) $(TV_CROSS_CONFIGURE_FLAGS)
$(eval $(call GenerateCrossOffsets,aarch64-apple-darwin10,$(TOP)/builds/crosstv/,crosstv,$(MONO_PATH)))
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
.stamp-build-crosstv: .stamp-configure-crosstv crosstv/aarch64-apple-darwin10.h $(MONO_DEPENDENCIES)
2016-04-21 14:18:44 +03:00
$(MAKE) -C crosstv/eglib
$(MAKE) -C crosstv/mono
$(MAKE) -C crosstv/mono install
[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 $@
2016-04-21 14:18:44 +03:00
TV_WATCH_TARGETS = \
$(PREFIX)/bin/aarch64-unknown-darwin-mono-sgen \
[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)/crosstv/bin/aarch64-unknown-darwin-mono-sgen: .stamp-build-crosstv
$(PREFIX)/bin/aarch64-unknown-darwin-mono-sgen: $(BUILD_DESTDIR)/crosstv/bin/aarch64-unknown-darwin-mono-sgen | $(PREFIX)/bin
2016-04-21 14:18:44 +03:00
$(call Q_2,INSTALL ,[CROSSTV]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $< $@
install-crosstv: install-llvm $(TV_WATCH_TARGETS)
clean-crosstv:
-rm -rf crosstv .stamp-configure-crosstv crosstv.config.cache
crosstv: build-crosstv install-crosstv