2016-04-21 16:40:25 +03:00
TOP = ..
i n c l u d e $( TOP ) / M a k e . c o n f i g
i n c l u d e $( TOP ) / m k / r u l e s . m k
#
# To add a new MSBuild assembly, add the base name to the corresponding [IOS|MAC|WATCH]_[BINDING]_TASK_ASSEMBLIES variable.
#
# New .targets and .props files are picked up automatically if they're in a directory with already
# existing .targets or .props files. If .targets or .props are added in a new directory, add that
# directory using a wildcard function to the corresponding [IOS|MAC|WATCH]_TARGETS variable.
#
##
## Common definitions
##
MSBUILD_PRODUCTS =
MSBUILD_DIRECTORIES =
MSBUILD_SYMLINKS =
MSBUILD_TASK_ASSEMBLIES =
2018-12-18 09:48:40 +03:00
ALL_SOURCES := $( shell git ls-files | sed 's/ /\\ /g' ) $( wildcard $( XAMARIN_MACDEV_PATH) /Xamarin.MacDev/*.cs) $( wildcard $( XAMARIN_MACDEV_PATH) /Xamarin.MacDev/*.csproj)
2016-04-21 16:40:25 +03:00
CONFIG = Debug
2020-01-16 20:22:48 +03:00
TARGETFRAMEWORK = netstandard2.0
2016-04-21 16:40:25 +03:00
##
## XI definitions
##
IOS_TARGETS = \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.MonoTouch.*.targets) \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.iOS.*.props) \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.iOS.*.targets) \
2020-06-02 15:26:25 +03:00
$( wildcard Xamarin.Shared/Xamarin.*.props) \
2018-12-12 17:55:57 +03:00
$( wildcard Xamarin.Shared/Xamarin.*.targets) \
2016-04-21 16:40:25 +03:00
IOS_BINDING_TARGETS = $( wildcard Xamarin.ObjcBinding.Tasks/*.targets)
2020-10-07 19:14:04 +03:00
LOCALIZATION_LANGUAGES = cs de es fr it ja ko pl pt-BR ru tr zh-Hans zh-Hant
TRANSLATED_ASSEMBLIES = $( foreach locale,$( LOCALIZATION_LANGUAGES) ,$( locale) /Xamarin.Localization.MSBuild)
2020-03-14 00:46:28 +03:00
LOCALIZATION_ASSEMBLIES = Xamarin.Localization.MSBuild
2020-05-21 16:09:10 +03:00
IOS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks $( LOCALIZATION_ASSEMBLIES)
2016-04-21 16:40:25 +03:00
IOS_DIRECTORIES = \
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/mono/Xamarin.iOS \
2016-10-13 11:47:46 +03:00
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS \
2016-04-21 16:40:25 +03:00
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList \
2018-01-09 19:09:04 +03:00
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin \
2020-10-07 19:14:04 +03:00
$( foreach language,$( LOCALIZATION_LANGUAGES) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/$( language) ) \
2016-04-21 16:40:25 +03:00
IOS_2_1_SYMLINKS = \
2016-10-13 11:47:46 +03:00
$( foreach target,$( IOS_BINDING_TARGETS) ,$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/$( notdir $( target) ) ) \
2016-04-21 16:40:25 +03:00
# these point to a file in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS
IOS_X_I_SYMLINKS = \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList/FrameworkList.xml \
2016-10-13 11:47:46 +03:00
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS \
2016-04-21 16:40:25 +03:00
2016-10-13 11:47:46 +03:00
IOS_SYMLINKS = $( IOS_X_I_SYMLINKS) $( IOS_2_1_SYMLINKS)
2016-04-21 16:40:25 +03:00
IOS_PRODUCTS = \
2016-10-13 11:47:46 +03:00
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/FrameworkList.xml \
$( foreach target,$( IOS_TARGETS) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/$( notdir $( target) ) ) \
$( foreach target,$( IOS_BINDING_TARGETS) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/$( notdir $( target) ) ) \
$( foreach dll,$( IOS_TASK_ASSEMBLIES) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/$( dll) .dll) \
2020-05-26 15:49:21 +03:00
$( foreach dll,$( IOS_TASK_ASSEMBLIES) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/$( dll) .pdb) \
2020-10-07 19:14:04 +03:00
$( foreach dll,$( TRANSLATED_ASSEMBLIES) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/iOS/$( dll) .resources.dll) \
2016-04-21 16:40:25 +03:00
$( IOS_SYMLINKS)
all-ios : $( IOS_PRODUCTS )
symlinks-ios : $( IOS_SYMLINKS )
i f d e f I N C L U D E _ I O S
MSBUILD_PRODUCTS += all-ios
MSBUILD_DIRECTORIES += $( IOS_DIRECTORIES)
MSBUILD_SYMLINKS += symlinks-ios
2016-10-13 11:47:46 +03:00
MSBUILD_TASK_ASSEMBLIES += $( IOS_TASK_ASSEMBLIES)
2016-04-21 16:40:25 +03:00
e n d i f
##
## XW definitions
##
WATCH_TARGETS = \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.*.props) \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.*.targets) \
2016-09-16 21:16:32 +03:00
Xamarin.iOS.Tasks.Core/NoCode.cs \
2016-04-21 16:40:25 +03:00
WATCH_DIRECTORIES = \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.WatchOS/v1.0/RedistList \
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/WatchOS \
# XW symlinks the entire $(MONOTOUCH_PREFIX)/lib/msbuild/WatchOS directory to
# /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/WatchOS instead of
# each separate file (like XI does).
WATCH_SYMLINKS = \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.WatchOS/v1.0/RedistList/FrameworkList.xml \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/WatchOS \
WATCH_PRODUCTS = \
$( WATCH_SYMLINKS) \
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/WatchOS/FrameworkList.xml \
$( foreach target,$( WATCH_TARGETS) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/WatchOS/$( notdir $( target) ) ) \
all-watch : $( WATCH_PRODUCTS )
symlinks-watch : $( WATCH_SYMLINKS )
i f d e f I N C L U D E _ W A T C H
MSBUILD_PRODUCTS += all-watch
MSBUILD_DIRECTORIES += $( WATCH_DIRECTORIES)
MSBUILD_SYMLINKS += symlinks-watch
e n d i f
##
## Xamarin.TVOS definitions
##
TVOS_TARGETS = \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.TVOS.*.props) \
$( wildcard Xamarin.iOS.Tasks.Core/Xamarin.TVOS.*.targets) \
TVOS_DIRECTORIES = \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList \
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/TVOS \
# Xamarin.TVOS symlinks the entire $(MONOTOUCH_PREFIX)/lib/msbuild/TVOS directory to
# /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/TVOS instead of
# each separate file (like XI does).
TVOS_SYMLINKS = \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList/FrameworkList.xml \
$( IOS_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/TVOS \
TVOS_PRODUCTS = \
$( TVOS_SYMLINKS) \
$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/TVOS/FrameworkList.xml \
$( foreach target,$( TVOS_TARGETS) ,$( IOS_DESTDIR) $( MONOTOUCH_PREFIX) /lib/msbuild/TVOS/$( notdir $( target) ) ) \
all-tvos : $( TVOS_PRODUCTS )
symlinks-tvos : $( TVOS_SYMLINKS )
i f d e f I N C L U D E _ T V O S
MSBUILD_PRODUCTS += all-tvos
MSBUILD_DIRECTORIES += $( TVOS_DIRECTORIES)
MSBUILD_SYMLINKS += symlinks-tvos
e n d i f
##
## XM definitions
##
2020-06-02 15:26:25 +03:00
MAC_TARGETS = \
$( wildcard Xamarin.Mac.Tasks/*.props) \
$( wildcard Xamarin.Mac.Tasks/*.targets) \
$( wildcard Xamarin.Shared/Xamarin.*.props) \
$( wildcard Xamarin.Shared/Xamarin.*.targets) \
2016-04-21 16:40:25 +03:00
MAC_BINDING_TARGETS =
2020-05-21 16:09:10 +03:00
MAC_TASK_ASSEMBLIES = Xamarin.Mac.Tasks $( LOCALIZATION_ASSEMBLIES)
2016-04-21 16:40:25 +03:00
MAC_DIRECTORIES = \
2020-05-04 11:51:29 +03:00
$( MAC_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin \
2016-04-21 16:40:25 +03:00
$( MAC_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList \
$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild \
$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/mono/4.5/RedistList \
$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /etc/mono/4.5 \
2020-10-07 19:14:04 +03:00
$( foreach language,$( LOCALIZATION_LANGUAGES) ,$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/$( language) ) \
2016-04-21 16:40:25 +03:00
MAC_SYMLINKS = \
$( MAC_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList/FrameworkList.xml \
2020-05-04 11:51:29 +03:00
$( MAC_DESTDIR) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac \
2016-04-21 16:40:25 +03:00
MAC_PRODUCTS = \
$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/FrameworkList.xml \
$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/mono/4.5/RedistList/FrameworkList.xml \
$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /etc/mono/4.5/machine.config \
$( foreach target,$( MAC_TARGETS) ,$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/$( notdir $( target) ) ) \
$( foreach target,$( MAC_BINDING_TARGETS) ,$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/$( notdir $( target) ) ) \
$( foreach dll,$( MAC_TASK_ASSEMBLIES) ,$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/$( dll) .dll) \
2020-05-26 15:49:21 +03:00
$( foreach dll,$( MAC_TASK_ASSEMBLIES) ,$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/$( dll) .pdb) \
2016-04-21 16:40:25 +03:00
$( MAC_SYMLINKS) \
2020-10-07 19:14:04 +03:00
$( foreach dll,$( TRANSLATED_ASSEMBLIES) ,$( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/msbuild/$( dll) .resources.dll) \
2016-04-21 16:40:25 +03:00
all-mac : $( MAC_PRODUCTS )
symlinks-mac : $( MAC_SYMLINKS )
i f d e f I N C L U D E _ M A C
MSBUILD_PRODUCTS += all-mac
MSBUILD_DIRECTORIES += $( MAC_DIRECTORIES)
MSBUILD_SYMLINKS += symlinks-mac
2020-05-21 16:09:10 +03:00
MSBUILD_TASK_ASSEMBLIES += $( MAC_TASK_ASSEMBLIES)
2016-04-21 16:40:25 +03:00
e n d i f
##
## Common definitions
##
##
## XI ##
##
# Symlinks
#
# Everything in /Library/Frameworks/Mono.framework/External are links into /Library/Frameworks/Xamarin.iOS.framework/Versions/Current
# This makes it easy to switch XI, by just pointing /Library/Frameworks/Xamarin.iOS.framework/Versions/Current somewhere else
2016-10-13 11:47:46 +03:00
$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/RedistList/FrameworkList.xml : | $( IOS_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild -frameworks /Xamarin .iOS /v 1.0/RedistList
$( Q) ln -fs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS/$( notdir $@ ) $@
2016-04-21 16:40:25 +03:00
2016-10-13 11:47:46 +03:00
$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS : | $( IOS_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild /Xamarin
$( Q) ln -Fhs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS $@
2016-04-21 16:40:25 +03:00
2016-10-13 11:47:46 +03:00
$(IOS_2_1_SYMLINKS) : | $( IOS_DIRECTORIES )
$( Q) ln -fs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS/$( notdir $@ ) $@
2016-04-21 16:40:25 +03:00
2016-10-13 11:47:46 +03:00
# The actual content goes into /Library/Frameworks/Xamarin.iOS.framework/Versions/Current
2016-04-21 16:40:25 +03:00
2016-10-13 11:47:46 +03:00
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/FrameworkList.xml : Xamarin .iOS .Tasks .Core /Xamarin .iOS -FrameworkList .xml .in Makefile | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /iOS
2016-04-21 16:40:25 +03:00
$( Q) sed 's@%TargetFrameworkDirectory%@$(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS@' $< > $@
2016-10-13 11:47:46 +03:00
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/% : Xamarin .ObjcBinding .Tasks /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /iOS
2016-04-21 16:40:25 +03:00
$( Q) install -m 644 $< $@
2016-10-13 11:47:46 +03:00
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/% : Xamarin .iOS .Tasks .Core /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /iOS
2016-04-21 16:40:25 +03:00
$( Q) install -m 644 $< $@
2018-12-12 17:55:57 +03:00
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/% : Xamarin .Shared /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /iOS
$( Q) install -m 644 $< $@
2020-10-07 19:14:04 +03:00
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/% : Xamarin .iOS .Tasks /bin /$( CONFIG ) /$( TARGETFRAMEWORK ) /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /iOS $( foreach language ,$ ( LOCALIZATION_LANGUAGES ) ,$ ( IOS_DESTDIR ) $ ( MONOTOUCH_PREFIX ) /lib /msbuild /iOS /$ ( language ) )
2020-05-26 15:49:21 +03:00
$( Q) install -m 644 $< $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/% : Xamarin .Localization .MSBuild /bin /$( CONFIG ) /$( TARGETFRAMEWORK ) /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /iOS
2016-04-21 16:40:25 +03:00
$( Q) install -m 644 $< $@
##
## XW
##
$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.WatchOS/v1.0/RedistList/FrameworkList.xml : | $( IOS_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild -frameworks /Xamarin .WatchOS /v 1.0/RedistList
$( Q) ln -fs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/WatchOS/$( notdir $@ ) $@
$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/WatchOS : | $( IOS_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild /Xamarin
$( Q) ln -Fhs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/WatchOS $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/WatchOS/FrameworkList.xml : Xamarin .iOS .Tasks .Core /Xamarin .WatchOS -FrameworkList .xml .in Makefile | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /WatchOS
$( Q) sed 's@%TargetFrameworkDirectory%@$(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.WatchOS@' $< > $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/WatchOS/% : Xamarin .iOS .Tasks .Core /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /WatchOS
$( Q) install -m 644 $< $@
##
## Xamarin.TVOS
##
$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.TVOS/v1.0/RedistList/FrameworkList.xml : | $( IOS_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild -frameworks /Xamarin .TVOS /v 1.0/RedistList
$( Q) ln -fs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/TVOS/$( notdir $@ ) $@
$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/TVOS : $( IOS_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild /Xamarin
$( Q) ln -Fhs $( IOS_TARGETDIR) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/TVOS $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/FrameworkList.xml : Xamarin .iOS .Tasks .Core /Xamarin .TVOS -FrameworkList .xml .in Makefile | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /TVOS
$( Q) sed 's@%TargetFrameworkDirectory%@$(IOS_TARGETDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS@' $< > $@
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/% : Xamarin .iOS .Tasks .Core /% | $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /TVOS
$( Q) install -m 644 $< $@
##
## XM ##
##
# Symlinks
#
# Everything in /Library/Frameworks/Mono.framework/External are links into /Library/Frameworks/Xamarin.Mac.framework/Versions/Current
# This makes it easy to switch XM, by just pointing /Library/Frameworks/Xamarin.Mac.framework/Versions/Current somewhere else
2020-05-04 11:51:29 +03:00
$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac : $( MAC_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild /Xamarin
$( Q) ln -Fhs $( MAC_TARGETDIR) /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/msbuild $@
$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList/FrameworkList.xml : | $( MAC_DESTDIR ) /Library /Frameworks /Mono .framework /External /xbuild -frameworks /Xamarin .Mac /v 2.0/RedistList
2016-04-21 16:40:25 +03:00
$( Q) ln -fs $( MAC_TARGETDIR) /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/msbuild/$( notdir $@ ) $@
# The actual content goes into /Library/Frameworks/Xamarin.Mac.framework/Versions/Current
2019-02-27 20:38:38 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/FrameworkList.xml : Xamarin .Mac .Tasks /Xamarin .Mac -Mobile -FrameworkList .xml .in Makefile | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild
2016-04-21 16:40:25 +03:00
$( Q) sed 's@%TargetFrameworkDirectory%@$(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac@' $< > $@
2019-02-27 20:38:38 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/4.5/RedistList/FrameworkList.xml : Xamarin .Mac .Tasks /Xamarin .Mac -Full -FrameworkList .xml .in Makefile | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /mono /4.5/RedistList
2016-04-21 16:40:25 +03:00
$( Q) sed 's@%TargetFrameworkDirectory%@$(MAC_TARGETDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5@' $< > $@
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/4.5/machine.config : $( TOP ) /tools /mmp /machine .4_ 5.config | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /etc /mono /4.5
2018-10-29 18:09:30 +03:00
$( Q) $( CP) $( TOP) /tools/mmp/machine.4_5.config $@
2016-04-21 16:40:25 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/% : Xamarin .Mac .Tasks /% | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild
$( Q) install -m 644 $< $@
2018-12-12 17:55:57 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/% : Xamarin .Shared /% | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild
$( Q) install -m 644 $< $@
2020-10-07 19:14:04 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/% : Xamarin .Mac .Tasks /bin /$( CONFIG ) /$( TARGETFRAMEWORK ) /% | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild $( foreach language ,$ ( LOCALIZATION_LANGUAGES ) ,$ ( MAC_DESTDIR ) $ ( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild /$ ( language ) )
2016-04-21 16:40:25 +03:00
$( Q) install -m 644 $< $@
2020-05-26 15:49:21 +03:00
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/% : Xamarin .Localization .MSBuild /bin /$( CONFIG ) /$( TARGETFRAMEWORK ) /% | $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild
$( Q) install -m 644 $< $@
2016-04-21 16:40:25 +03:00
##
2020-05-21 11:18:56 +03:00
## net5 targets ##
##
# tvOS and watchOS ships most of the iOS targets as well (for now, we don't need all of these, so this is optimizable)
DOTNET_SHARED_FILES = $( IOS_TARGETS) $( IOS_BINDING_TARGETS) $( foreach dll,$( IOS_TASK_ASSEMBLIES) ,$( dll) .dll $( dll) .pdb)
DOTNET_IOS_FILES = $( DOTNET_SHARED_FILES) FrameworkList.xml
DOTNET_TVOS_FILES = $( TVOS_TARGETS) FrameworkList.xml
2020-05-27 11:23:52 +03:00
DOTNET_WATCHOS_FILES = $( WATCH_TARGETS) FrameworkList.xml
2020-05-21 11:18:56 +03:00
DOTNET_MACOS_FILES = $( MAC_TARGETS) $( MAC_BINDING_TARGETS) $( foreach dll,$( MAC_TASK_ASSEMBLIES) ,$( dll) .dll $( dll) .pdb) FrameworkList.xml
# iOS
DOTNET_TARGETS += \
$( foreach target,$( DOTNET_IOS_FILES) ,$( DOTNET_DESTDIR) /$( IOS_NUGET) .Sdk/tools/msbuild/iOS/$( notdir $( target) ) ) \
# tvOS: contains all of the files for iOS as well (for now, we don't need all of them, so this is optimizable)
DOTNET_TARGETS += \
$( foreach target,$( DOTNET_SHARED_FILES) ,$( DOTNET_DESTDIR) /$( TVOS_NUGET) .Sdk/tools/msbuild/iOS/$( notdir $( target) ) ) \
$( foreach target,$( DOTNET_TVOS_FILES) ,$( DOTNET_DESTDIR) /$( TVOS_NUGET) .Sdk/tools/msbuild/tvOS/$( notdir $( target) ) ) \
# watchOS: contains all of the files for iOS as well (for now, we don't need all of them, so this is optimizable)
DOTNET_TARGETS += \
$( foreach target,$( DOTNET_SHARED_FILES) ,$( DOTNET_DESTDIR) /$( WATCHOS_NUGET) .Sdk/tools/msbuild/iOS/$( notdir $( target) ) ) \
$( foreach target,$( DOTNET_WATCHOS_FILES) ,$( DOTNET_DESTDIR) /$( WATCHOS_NUGET) .Sdk/tools/msbuild/watchOS/$( notdir $( target) ) ) \
# macOS
2020-09-21 17:53:06 +03:00
i f d e f I N C L U D E _ M A C
2020-05-21 11:18:56 +03:00
DOTNET_TARGETS += \
$( foreach target,$( DOTNET_MACOS_FILES) ,$( DOTNET_DESTDIR) /$( MACOS_NUGET) .Sdk/tools/msbuild/macOS/$( notdir $( target) ) ) \
2020-09-21 17:53:06 +03:00
e n d i f
2020-05-21 11:18:56 +03:00
DOTNET_DIRECTORIES += \
$( DOTNET_DESTDIR) /$( IOS_NUGET) .Sdk/tools/msbuild/iOS \
$( DOTNET_DESTDIR) /$( TVOS_NUGET) .Sdk/tools/msbuild/iOS \
$( DOTNET_DESTDIR) /$( TVOS_NUGET) .Sdk/tools/msbuild/tvOS \
$( DOTNET_DESTDIR) /$( WATCHOS_NUGET) .Sdk/tools/msbuild/iOS \
$( DOTNET_DESTDIR) /$( WATCHOS_NUGET) .Sdk/tools/msbuild/watchOS \
$( DOTNET_DESTDIR) /$( MACOS_NUGET) .Sdk/tools/msbuild/macOS \
$(DOTNET_DESTDIR)/$(MACOS_NUGET).Sdk/tools/msbuild/macOS/% : $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /msbuild /% | $( DOTNET_DIRECTORIES )
$( Q) $( CP) $< $@
$(DOTNET_DESTDIR)/$(IOS_NUGET).Sdk/tools/msbuild/% : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /% | $( DOTNET_DIRECTORIES )
$( Q) $( CP) $< $@
$(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/% : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /% | $( DOTNET_DIRECTORIES )
$( Q) $( CP) $< $@
$(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/tvOS/% : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /TVOS /% | $( DOTNET_DIRECTORIES )
$( Q) $( CP) $< $@
$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/% : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /% | $( DOTNET_DIRECTORIES )
$( Q) $( CP) $< $@
$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/watchOS/% : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /msbuild /WatchOS /% | $( DOTNET_DIRECTORIES )
$( Q) $( CP) $< $@
MSBUILD_DIRECTORIES += $( DOTNET_DIRECTORIES)
i f d e f E N A B L E _ D O T N E T
MSBUILD_PRODUCTS += $( DOTNET_TARGETS)
e n d i f
##
2016-04-21 16:40:25 +03:00
## Common targets ##
##
# we must install locally during 'make all', because the F# build depends on the msbuild targets/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
all-local :: $( MSBUILD_PRODUCTS ) .stamp -test -xml
2016-04-21 16:40:25 +03:00
.build-stamp : $( ALL_SOURCES )
$( Q) $( SYSTEM_MONO) /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore
2018-01-08 22:29:52 +03:00
$( Q) $( SYSTEM_MSBUILD) $( XBUILD_VERBOSITY)
2016-04-21 16:40:25 +03:00
$( Q) touch $@
# make all the target assemblies build when any of the sources have changed
2020-05-26 15:49:21 +03:00
$(foreach dll,$(MSBUILD_TASK_ASSEMBLIES),$(dll)/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(dll).dll $(dll)/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(dll).pdb) : .build -stamp
2020-10-07 19:14:04 +03:00
$(foreach dll,$(TRANSLATED_ASSEMBLIES),Xamarin.Localization.MSBuild/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(dll).resources.dll) : .build -stamp
2016-04-21 16:40:25 +03:00
# Always remake the symlinks
.PHONY : $( MSBUILD_SYMLINKS )
# this is a directory-creating target.
2020-05-04 11:51:29 +03:00
# we sort to remove duplicates, which can happen if MAC_DESTDIR and IOS_DESTDIR are the same (both create a '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin' target)
$(sort $(MSBUILD_DIRECTORIES)) build :
2016-04-21 16:40:25 +03:00
$( Q) mkdir -p $@
install-symlinks : $( MSBUILD_SYMLINKS )
install-local :: $( MSBUILD_PRODUCTS )
[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-test-xml : $( wildcard */*.targets ) $( wildcard */*.props )
$( Q) xmllint --noout $^
2016-04-21 16:40:25 +03:00
@echo Targets files are valid XML
[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
@touch $@
2016-04-21 16:40:25 +03:00
2020-05-29 18:50:46 +03:00
test run-test : run -test -ios run -test -mac
run-test-ios :
2020-01-14 10:16:02 +03:00
$( MAKE) -C $( TOP) /tests test-ios-tasks
2020-05-29 18:50:46 +03:00
run-test-mac :
$( MAKE) -C $( TOP) /tests run-mac-msbuild
2020-01-14 10:16:02 +03:00
clean-local ::
git clean -xfdq
cd $( XAMARIN_MACDEV_PATH) && git clean -xfdq
2020-05-21 11:18:56 +03:00
dotnet : $( DOTNET_TARGETS )
2016-04-21 16:40:25 +03:00
# make will automatically consider files created in chained implicit rules as temporary files, and delete them afterwards
# marking those files as .SECONDARY will prevent that deletion.
2018-01-08 22:29:52 +03:00
.SECONDARY : $( foreach file ,$ ( MSBUILD_TASK_ASSEMBLIES ) ,unbuild /$ ( file ) .dll ) $( foreach file ,$ ( MSBUILD_TASK_ASSEMBLIES ) ,build /$ ( file ) .dll )