2016-04-21 16:06:16 +03:00
TOP = ../..
i n c l u d e $( TOP ) / M a k e . c o n f i g
ifdef SKIP_NEW_APIS #Requires https : //github .com /mono /mono /commit /4c 6a 463678f 3f 0bfa 599caeb 66de 72c 7217fa 95d
NEW_REGEX = "-n:.?"
e n d i f
i f d e f S K I P _ A D D E D _ A P I S
ADD_REGEX = "-a:.?"
e n d i f
2022-06-09 16:47:00 +03:00
i f e q ( $( APIDIFF_DIR ) , )
APIDIFF_DIR = temp
e n d i f
i f e q ( $( OUTPUT_DIR ) , )
OUTPUT_DIR = output
e n d i f
i f n d e f S K I P _ X A M A R I N _ V S _ D O T N E T
INCLUDE_XAMARIN_VS_DOTNET = 1
e n d i f
2022-10-27 18:18:48 +03:00
i f d e f E N A B L E _ D O T N E T
i f d e f I N C L U D E _ I O S
i f d e f I N C L U D E _ M A C C A T A L Y S T
2022-06-09 16:47:00 +03:00
i f n d e f S K I P _ I O S _ V S _ M A C C A T A L Y S T
INCLUDE_IOS_VS_MACCATALYST = 1
e n d i f
2022-10-27 18:18:48 +03:00
e n d i f
e n d i f
e n d i f
2018-02-09 15:07:22 +03:00
2022-05-11 23:01:39 +03:00
MONO_API_INFO = $( API_TOOLS_PATH) /mono-api-info/bin/Debug/net6.0/mono-api-info.dll
MONO_API_HTML = $( API_TOOLS_PATH) /mono-api-html/bin/Debug/net6.0/mono-api-html.dll
2019-05-06 08:31:03 +03:00
MONO_BUILD = $( SYSTEM_MONO)
2016-08-25 12:31:56 +03:00
2022-06-07 11:11:02 +03:00
MONO_API_INFO_EXEC = $( DOTNET) $( MONO_API_INFO) --ignore-inherited-interfaces
MONO_API_HTML_EXEC = $( DOTNET) $( MONO_API_HTML)
2022-05-09 23:12:03 +03:00
2022-06-09 16:47:00 +03:00
export HTML_BREAKING_CHANGES_MESSAGE = ❗️ Breaking changes❗️
export HTML_NO_BREAKING_CHANGES_MESSAGE = No breaking changes
export MARKDOWN_BREAKING_CHANGES_MESSAGE = :heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:
export MARKDOWN_NO_BREAKING_CHANGES_MESSAGE = No breaking changes
2016-04-21 16:06:16 +03:00
# I18N are excluded - but otherwise if should be like ../../builds/Makefile + what XI adds
# in the order to the api-diff.html merged file
MONO_ASSEMBLIES = mscorlib System System.Core System.Numerics\
System.ComponentModel.DataAnnotations System.ComponentModel.Composition \
System.Data System.Data.Services.Client \
System.Json System.Runtime.Serialization System.ServiceModel System.ServiceModel.Web System.Web.Services \
System.Xml System.Xml.Linq System.Xml.Serialization \
System.IO.Compression System.IO.Compression.FileSystem System.Net System.Transactions System.Windows \
Mono.Data.Sqlite Mono.Data.Tds Mono.Security
# this lists the mono-BCL assemblies (without extension) as they appear installed
# (relative to /Library/Frameworks/Xamarin.[Mac|iOS].framework/Versions/Current/lib/mono)
IOS_SRC_ASSEMBLIES = \
Xamarin.iOS/MonoTouch.Dialog-1 Xamarin.iOS/MonoTouch.NUnitLite Xamarin.iOS/OpenTK-1.0 Xamarin.iOS/System.Net.Http Xamarin.iOS/Xamarin.iOS
MAC_SRC_ASSEMBLIES = \
Xamarin.Mac/Xamarin.Mac Xamarin.Mac/OpenTK \
4.5/Xamarin.Mac 4.5/OpenTK
WATCHOS_SRC_ASSEMBLIES = Xamarin.WatchOS/Xamarin.WatchOS Xamarin.WatchOS/MonoTouch.NUnitLite Xamarin.WatchOS/System.Net.Http
TVOS_SRC_ASSEMBLIES = Xamarin.TVOS/Xamarin.TVOS Xamarin.TVOS/MonoTouch.Dialog-1 Xamarin.TVOS/MonoTouch.NUnitLite Xamarin.TVOS/OpenTK-1.0 Xamarin.TVOS/System.Net.Http
2016-09-21 18:48:28 +03:00
IOS_ASSEMBLIES = $( foreach file,$( MONO_ASSEMBLIES) ,Xamarin.iOS/$( file) ) $( IOS_SRC_ASSEMBLIES)
2016-04-21 16:06:16 +03:00
MAC_ASSEMBLIES = $( foreach file,$( MONO_ASSEMBLIES) ,Xamarin.Mac/$( file) ) $( MAC_SRC_ASSEMBLIES)
2016-10-03 15:57:32 +03:00
WATCHOS_ASSEMBLIES = $( foreach file,$( filter-out Mono.Data.Tds Mono.Security,$( MONO_ASSEMBLIES) ) ,Xamarin.WatchOS/$( file) ) $( WATCHOS_SRC_ASSEMBLIES)
2016-04-21 16:06:16 +03:00
TVOS_ASSEMBLIES = $( foreach file,$( MONO_ASSEMBLIES) ,Xamarin.TVOS/$( file) ) $( TVOS_SRC_ASSEMBLIES)
2022-09-21 15:24:13 +03:00
DOTNET_LEGACY_PLATFORMS = $( filter-out MacCatalyst,$( DOTNET_PLATFORMS) )
DOTNET_LEGACY_ASSEMBLIES = $( foreach platform,$( DOTNET_LEGACY_PLATFORMS) ,Microsoft.$( platform) .Ref/ref/$( DOTNET_TFM) /Microsoft.$( platform) )
2022-05-06 09:15:37 +03:00
DOTNET_ASSEMBLIES = $( foreach platform,$( DOTNET_PLATFORMS) ,Microsoft.$( platform) .Ref/ref/$( DOTNET_TFM) /Microsoft.$( platform) )
2016-04-21 16:06:16 +03:00
IOS_ARCH_ASSEMBLIES = native-32/Xamarin.iOS native-64/Xamarin.iOS
2019-07-15 20:19:24 +03:00
MAC_ARCH_ASSEMBLIES = native-64/Xamarin.Mac
2016-04-21 16:06:16 +03:00
2019-03-06 19:02:50 +03:00
APIDIFF_IGNORE = -i 'INSObjectProtocol'
2022-05-11 23:01:39 +03:00
$(MONO_API_INFO) : $( wildcard $ ( API_TOOLS_PATH ) /mono -api -info /*.cs *)
2022-06-07 11:11:02 +03:00
$( Q) $( DOTNET) build $( API_TOOLS_PATH) /mono-api-info/mono-api-info.csproj /bl:$@ .binlog $( MSBUILD_VERBOSITY)
2019-05-22 15:41:18 +03:00
$( Q) touch $@
2022-05-11 23:01:39 +03:00
$(MONO_API_HTML) : $( wildcard $ ( API_TOOLS_PATH ) /mono -api -html /*.cs *)
2022-06-07 11:11:02 +03:00
$( Q) $( DOTNET) build $( API_TOOLS_PATH) /mono-api-html/mono-api-html.csproj /bl:$@ .binlog $( MSBUILD_VERBOSITY)
2022-05-11 23:01:39 +03:00
$( Q) touch $@
2019-05-22 15:41:18 +03:00
2016-04-21 16:06:16 +03:00
# create api info. Directory hierarchy is based on installed hierarchy
# (XM goes into temp/xm, and XI goes into temp/xi)
2019-05-22 15:41:18 +03:00
$(APIDIFF_DIR)/temp/xi/%.xml : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /mono /%.dll $( MONO_API_INFO )
2016-04-21 16:06:16 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2016-04-21 16:06:16 +03:00
2019-05-22 15:41:18 +03:00
$(APIDIFF_DIR)/temp/xm/%.xml : $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /mono /%.dll $( MONO_API_INFO )
2019-03-06 19:02:50 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) -d $( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/mono/Xamarin.Mac $( abspath $<) -o $( abspath $@ )
2019-03-06 19:02:50 +03:00
2019-05-22 15:41:18 +03:00
$(APIDIFF_DIR)/temp/xm/4.5/Xamarin.Mac.xml : $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /mono /4.5/Xamarin .Mac .dll $( MONO_API_INFO )
2016-04-21 16:06:16 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) -d $( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/mono/4.5 $( abspath $<) -o $( abspath $@ )
2016-04-21 16:06:16 +03:00
2019-05-22 15:41:18 +03:00
$(APIDIFF_DIR)/temp/native-%/Xamarin.Mac.xml : $( TOP ) /src /build /mac /mobile -%/Xamarin .Mac .dll $( MONO_API_INFO )
2016-04-21 16:06:16 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) -d $( MAC_DESTDIR) $( MAC_FRAMEWORK_CURRENT_DIR) /lib/mono/Xamarin.Mac $( abspath $<) -o $( abspath $@ )
2016-04-21 16:06:16 +03:00
2019-05-22 15:41:18 +03:00
$(APIDIFF_DIR)/temp/native-%/Xamarin.iOS.xml : $( TOP ) /src /build /ios /native -%/Xamarin .iOS .dll $( MONO_API_INFO )
2016-04-21 16:06:16 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2016-04-21 16:06:16 +03:00
2021-10-15 20:04:35 +03:00
$(APIDIFF_DIR)/temp/dotnet/legacy-diff/%.xml : $( DOTNET_DESTDIR ) /%.dll $( MONO_API_INFO )
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2021-10-15 20:04:35 +03:00
$(APIDIFF_DIR)/temp/dotnet/%.xml : $( DOTNET_DESTDIR ) /%.dll $( MONO_API_INFO )
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2021-10-15 20:04:35 +03:00
2016-04-21 16:06:16 +03:00
# create diff from api info and reference info
# note that we create an empty file (the 'touch' command)
# so that we get a file in all cases (so that we don't have
# to run mono-api-html every time even if none of the
# dependencies changed)
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/diff/%.html $(OUTPUT_DIR)/diff/%.md : $( APIDIFF_DIR ) /temp /%.xml $( APIDIFF_DIR ) /references /%.xml $( MONO_API_HTML )
2016-04-21 16:06:16 +03:00
$( Q) mkdir -p $( dir $@ )
2022-06-09 16:47:00 +03:00
$( QF_GEN) $( MONO_API_HTML_EXEC) $( NEW_REGEX) $( ADD_REGEX) $( abspath $( APIDIFF_DIR) /references/$* .xml) $( abspath $( APIDIFF_DIR) /temp/$* .xml) $( APIDIFF_IGNORE) --html " $( abspath $( basename $@ ) .html) " --markdown " $( abspath $( basename $@ ) .md) "
2016-04-21 16:06:16 +03:00
$( Q) touch $@
2022-05-10 15:22:30 +03:00
$(APIDIFF_DIR)/references/xi/Xamarin.iOS/Xamarin.iOS-converted.xml : $( APIDIFF_DIR ) /references /xi /Xamarin .iOS /Xamarin .iOS .xml
$( Q) sed 's/assembly name="Xamarin.iOS"/assembly name="Microsoft.iOS"/' $< > $@
$(APIDIFF_DIR)/references/xm/Xamarin.Mac/Xamarin.Mac-converted.xml : $( APIDIFF_DIR ) /references /xm /Xamarin .Mac /Xamarin .Mac .xml
$( Q) sed 's/assembly name="Xamarin.Mac"/assembly name="Microsoft.macOS"/' $< > $@
$(APIDIFF_DIR)/references/xi/Xamarin.TVOS/Xamarin.TVOS-converted.xml : $( APIDIFF_DIR ) /references /xi /Xamarin .TVOS /Xamarin .TVOS .xml
$( Q) sed 's/assembly name="Xamarin.TVOS"/assembly name="Microsoft.tvOS"/' $< > $@
$(APIDIFF_DIR)/temp/dotnet/Microsoft.iOS.Ref/ref/$(DOTNET_TFM)/Microsoft.MacCatalyst-as-iOS.xml : $( APIDIFF_DIR ) /temp /dotnet /Microsoft .MacCatalyst .Ref /ref /$( DOTNET_TFM ) /Microsoft .MacCatalyst .xml
$( Q) sed -e 's/assembly name="Microsoft.MacCatalyst"/assembly name="Microsoft.iOS"/' $< > $@
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/$(DOTNET_TFM)/%.html $(OUTPUT_DIR)/diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/$(DOTNET_TFM)/%.md : $( APIDIFF_DIR ) /temp /dotnet /Microsoft .iOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .iOS .xml $( APIDIFF_DIR ) /references /xi /Xamarin .iOS /Xamarin .iOS -converted .xml $( MONO_API_HTML )
2021-12-15 07:19:36 +03:00
$( Q) mkdir -p $( dir $@ )
2022-06-09 16:47:00 +03:00
$( QF_GEN) $( MONO_API_HTML_EXEC) $( NEW_REGEX) $( ADD_REGEX) $( abspath $( APIDIFF_DIR) /references/xi/Xamarin.iOS/Xamarin.iOS-converted.xml) $( abspath $<) $( APIDIFF_IGNORE) --html $( abspath $( basename $@ ) .html) --markdown $( abspath $( basename $@ ) .md)
2021-12-15 07:19:36 +03:00
$( Q) touch $@
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/$(DOTNET_TFM)/%.html $(OUTPUT_DIR)/diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/$(DOTNET_TFM)/%.md : $( APIDIFF_DIR ) /temp /dotnet /Microsoft .macOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .macOS .xml $( APIDIFF_DIR ) /references /xm /Xamarin .Mac /Xamarin .Mac -converted .xml $( MONO_API_HTML )
2021-12-15 07:19:36 +03:00
$( Q) mkdir -p $( dir $@ )
2022-06-09 16:47:00 +03:00
$( QF_GEN) $( MONO_API_HTML_EXEC) $( NEW_REGEX) $( ADD_REGEX) $( abspath $( APIDIFF_DIR) /references/xm/Xamarin.Mac/Xamarin.Mac-converted.xml) $( abspath $<) $( APIDIFF_IGNORE) --html $( abspath $( basename $@ ) .html) --markdown $( abspath $( basename $@ ) .md)
2021-12-15 07:19:36 +03:00
$( Q) touch $@
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/$(DOTNET_TFM)/%.html $(OUTPUT_DIR)/diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/$(DOTNET_TFM)/%.md : $( APIDIFF_DIR ) /temp /dotnet /Microsoft .tvOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .tvOS .xml $( APIDIFF_DIR ) /references /xi /Xamarin .TVOS /Xamarin .TVOS -converted .xml $( MONO_API_HTML )
2021-12-15 07:19:36 +03:00
$( Q) mkdir -p $( dir $@ )
2022-06-09 16:47:00 +03:00
$( QF_GEN) $( MONO_API_HTML_EXEC) $( NEW_REGEX) $( ADD_REGEX) $( abspath $( APIDIFF_DIR) /references/xi/Xamarin.TVOS/Xamarin.TVOS-converted.xml) $( abspath $<) $( APIDIFF_IGNORE) --html $( abspath $( basename $@ ) .html) --markdown $( abspath $( basename $@ ) .md)
2021-12-15 07:19:36 +03:00
$( Q) touch $@
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/$(DOTNET_TFM)/%.html $(OUTPUT_DIR)/diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/$(DOTNET_TFM)/%.md : $( APIDIFF_DIR ) /temp /dotnet /Microsoft .iOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .iOS .xml $( APIDIFF_DIR ) /temp /dotnet /Microsoft .iOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .MacCatalyst -as -iOS .xml $( MONO_API_HTML )
2021-12-15 07:19:36 +03:00
$( Q) mkdir -p $( dir $@ )
2022-06-09 16:47:00 +03:00
$( QF_GEN) $( MONO_API_HTML_EXEC) $( NEW_REGEX) $( ADD_REGEX) $( abspath $<) $( abspath $( APIDIFF_DIR) /temp/dotnet/Microsoft.iOS.Ref/ref/$( DOTNET_TFM) /Microsoft.MacCatalyst-as-iOS.xml) $( APIDIFF_IGNORE) --html $( abspath $( basename $@ ) .html) --markdown $( abspath $( basename $@ ) .md)
2016-04-21 16:06:16 +03:00
# create diff files for all the assemblies per platform
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/mac-api-diff.html : $( foreach file ,$ ( MAC_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xm /$ ( file ) .html )
$(OUTPUT_DIR)/ios-api-diff.html : $( foreach file ,$ ( IOS_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xi /$ ( file ) .html )
$(OUTPUT_DIR)/watchos-api-diff.html : $( foreach file ,$ ( WATCHOS_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xi /$ ( file ) .html )
$(OUTPUT_DIR)/tvos-api-diff.html : $( foreach file ,$ ( TVOS_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xi /$ ( file ) .html )
2021-10-15 20:04:35 +03:00
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/%-api-diff.html :
2016-04-21 16:06:16 +03:00
$( Q) rm -f $@
2022-06-09 16:47:00 +03:00
$( Q) mkdir -p $$ ( dirname " $@ " ) ;
2016-04-21 16:06:16 +03:00
$( Q) touch $@ -toc
$( Q_GEN) for file in $? ; do \
if [ [ "x0" != " x`stat -L -f %z $$ file` " ] ] ; then \
2021-12-15 07:19:36 +03:00
cat $$ file | sed " s*<h1>*<h1 id=' $$ file'>* " >> $@ ; \
2016-04-21 16:06:16 +03:00
echo "<br><hr>" >> $@ ; \
2022-05-06 09:15:37 +03:00
echo " <a href='# $$ file'>`echo $$ file | sed -e 's_html_dll_' -e 's_diff/xi/Xamarin.iOS/__' -e 's_diff/xi/Xamarin.WatchOS/__' -e 's_diff/xi/Xamarin.TVOS/__' -e 's_diff/xm/4.5/_\(Full profile\) _' -e 's_diff/xm/Xamarin.Mac/_\(Mobile profile\) _' -e 's_diff/xm/_\(Classic profile\) _' -e 's_diff/dotnet/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/Microsoft.tvOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/Microsoft.macOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/Microsoft.MacCatalyst.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's_diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /__' -e 's#/Users/.*apidiff/##' `</a><br/> " >> $@ -toc; \
2016-04-21 16:06:16 +03:00
fi ; \
done
$( Q) if [ ! -f $@ ] ; then \
echo "No change detected" > $@ ; \
fi ;
$( Q) echo "<h1>API diff</h1>" > $@ .temp
$( Q) cat $@ -toc >> $@ .temp
$( Q) echo "<br><hr>" >> $@ .temp
$( Q) cat $@ >> $@ .temp
$( Q) mv $@ .temp $@
$( Q) rm -f $@ -toc
2022-10-17 10:26:48 +03:00
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
2016-04-21 16:06:16 +03:00
i f d e f I N C L U D E _ M A C
2022-06-09 16:47:00 +03:00
API_DIFF_DEPENDENCIES += $( OUTPUT_DIR) /mac-api-diff.html
2016-04-21 16:06:16 +03:00
e n d i f
i f d e f I N C L U D E _ I O S
2022-06-09 16:47:00 +03:00
API_DIFF_DEPENDENCIES += $( OUTPUT_DIR) /ios-api-diff.html
2016-04-21 16:06:16 +03:00
i f d e f I N C L U D E _ W A T C H
2022-06-09 16:47:00 +03:00
API_DIFF_DEPENDENCIES += $( OUTPUT_DIR) /watchos-api-diff.html
2016-04-21 16:06:16 +03:00
e n d i f
i f d e f I N C L U D E _ T V O S
2022-06-09 16:47:00 +03:00
API_DIFF_DEPENDENCIES += $( OUTPUT_DIR) /tvos-api-diff.html
2016-04-21 16:06:16 +03:00
e n d i f
2022-10-17 10:26:48 +03:00
e n d i f
2022-10-27 18:18:48 +03:00
e n d i f # INCLUDE_IOS
2022-06-09 16:47:00 +03:00
i f d e f I N C L U D E _ I O S _ V S _ M A C C A T A L Y S T
API_DIFF_DEPENDENCIES += $( OUTPUT_DIR) /diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/$( DOTNET_TFM) /Microsoft.iOS.MacCatalyst.html
2022-10-27 18:18:48 +03:00
e n d i f # INCLUDE_IOS_VS_MACCATALYST
2021-10-15 20:04:35 +03:00
i f d e f E N A B L E _ D O T N E T
2022-06-09 16:47:00 +03:00
API_DIFF_DEPENDENCIES += $( foreach assembly,$( DOTNET_ASSEMBLIES) ,$( OUTPUT_DIR) /diff/dotnet/$( assembly) .html)
i f d e f I N C L U D E _ X A M A R I N _ V S _ D O T N E T
API_DIFF_DEPENDENCIES += $( foreach assembly,$( DOTNET_LEGACY_ASSEMBLIES) ,$( OUTPUT_DIR) /diff/dotnet/legacy-diff/$( assembly) .html)
e n d i f
2016-04-21 16:06:16 +03:00
e n d i f
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/index.html : $( OUTPUT_DIR ) /api -diff .html
$( Q) $( CP) $< $@
#
# Collect all the diffs into a single api-diff.html file
#
d e f i n e A p i D i f f R e p o r t H t m l
$( Q) ./report-status.sh " $( 1) " " $( OUTPUT_DIR) " html " diff/dotnet/Microsoft. $( 1) .Ref/ref/ $( DOTNET_TFM) /Microsoft. $( 1) .html " " diff/dotnet/Microsoft. $( 1) .Ref/ref/ $( DOTNET_TFM) /Microsoft. $( 1) .md " " $( 2) "
2022-05-13 21:44:15 +03:00
e n d e f
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/api-diff.html : $( API_DIFF_DEPENDENCIES )
2016-04-21 16:06:16 +03:00
$( QF_GEN) echo "<h1>API diffs</h1>" > $@
2022-06-09 16:47:00 +03:00
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
$( Q) if $( foreach html,$( wildcard $( OUTPUT_DIR) /*-api-diff.html) ,! test -s " $( html) " && ) true; then \
echo "<h2>Legacy Xamarin (empty diffs)</h2>" >> " $@ " ; \
elif grep BreakingChangesDetected " $( OUTPUT_DIR) " /*-api-diff.html & > /dev/null; then \
echo " <h2>Legacy Xamarin ( $( HTML_BREAKING_CHANGES_MESSAGE) )</h2> " >> " $@ " ; \
2016-04-21 16:06:16 +03:00
else \
2022-06-09 16:47:00 +03:00
echo " <h2>Legacy Xamarin ( $( HTML_NO_BREAKING_CHANGES_MESSAGE) )</h2> " >> " $@ " ; \
fi
$( Q) echo "<ul>" >> $@
i f d e f I N C L U D E _ I O S
$( Q) ./report-status.sh "iOS" " $( OUTPUT_DIR) " html "ios-api-diff.html" "ios-api-diff.md" " $@ "
e n d i f
2016-04-21 16:06:16 +03:00
i f d e f I N C L U D E _ T V O S
2022-06-09 16:47:00 +03:00
$( Q) ./report-status.sh "tvOS" " $( OUTPUT_DIR) " html "tvos-api-diff.html" "tvos-api-diff.md" " $@ "
2016-04-21 16:06:16 +03:00
e n d i f
i f d e f I N C L U D E _ W A T C H
2022-06-09 16:47:00 +03:00
$( Q) ./report-status.sh "watchOS" " $( OUTPUT_DIR) " html "watchos-api-diff.html" "watchos-api-diff.md" " $@ "
e n d i f
i f d e f I N C L U D E _ M A C
$( Q) ./report-status.sh "macOS" " $( OUTPUT_DIR) " html "mac-api-diff.html" "mac-api-diff.md" " $@ "
e n d i f
$( Q) echo "</ul>" >> $@
e n d i f # INCLUDE_XAMARIN_LEGACY
i f d e f E N A B L E _ D O T N E T
$( Q) if $( foreach html,$( wildcard $( OUTPUT_DIR) /diff/dotnet/Microsoft.*.Ref/ref/$( DOTNET_TFM) /Microsoft.*.html) ,! test -s " $( html) " && ) true; then \
echo "<h2>.NET (empty diffs)</h2>" >> " $@ " ; \
elif grep BreakingChangesDetected " $( OUTPUT_DIR) " /diff/dotnet/Microsoft.*.Ref/ref/" $( DOTNET_TFM) " /Microsoft.*.html & > /dev/null; then \
echo " <h2>.NET ( $( HTML_BREAKING_CHANGES_MESSAGE) )</h2> " >> " $@ " ; \
2016-04-21 16:06:16 +03:00
else \
2022-06-09 16:47:00 +03:00
echo " <h2>.NET ( $( HTML_NO_BREAKING_CHANGES_MESSAGE) )</h2> " >> " $@ " ; \
fi
$( Q) echo "<ul>" >> $@
@# New .NET vs Stable .NET
$( Q) $( foreach platform,$( DOTNET_PLATFORMS) ,$( call ApiDiffReportHtml,$( platform) ,$@ ) )
@# .NET: Microsoft.iOS vs Microsoft.MacCatalyst
i f d e f I N C L U D E _ I O S _ V S _ M A C C A T A L Y S T
$( Q) echo " <li>Microsoft.iOS vs Microsoft.MacCatalyst: <a href='diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.MacCatalyst.html'>html</a> <a href='diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.MacCatalyst.md'>markdown</a></li> " >> $@
e n d i f
$( Q) echo "</ul>" >> $@
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
i f d e f I N C L U D E _ X A M A R I N _ V S _ D O T N E T
$( Q) echo "<h2>Legacy Xamarin (stable) vs .NET</h2>" >> $@
$( Q) echo "<ul>" >> $@
@# .NET vs legacy ( stable)
i f d e f I N C L U D E _ I O S
$( Q) echo " <li>iOS: <a href='diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.html'>html</a> <a href='diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.md'>markdown</a></li> " >> $@
2016-04-21 16:06:16 +03:00
e n d i f
2022-06-09 16:47:00 +03:00
i f d e f I N C L U D E _ T V O S
$( Q) echo " <li>tvOS: <a href='diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.tvOS.html'>html</a> <a href='diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.tvOS.md'>markdown</a></li> " >> $@
2016-04-21 16:06:16 +03:00
e n d i f
i f d e f I N C L U D E _ M A C
2022-06-09 16:47:00 +03:00
$( Q) echo " <li>macOS: <a href='diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.macOS.html'>html</a> <a href='diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.macOS.md'>markdown</a></li> " >> $@
2016-04-21 16:06:16 +03:00
e n d i f
2022-06-09 16:47:00 +03:00
$( Q) echo "</ul>" >> $@
e n d i f # INCLUDE_XAMARIN_VS_DOTNET
e n d i f # INCLUDE_XAMARIN_LEGACY
e n d i f # DOTNET
$( Q) if grep " $( HTML_BREAKING_CHANGES_MESSAGE) " $@ >/dev/null 2>& 1; then \
echo "" >> $@ ; \
echo "<!-- BreakingChangesDetected -->" >> $@ ; \
echo "" >> $@ ; \
fi
#
# Collect all the diffs into a single api-diff.md file
#
2016-04-21 16:06:16 +03:00
2022-06-09 16:47:00 +03:00
d e f i n e A p i D i f f R e p o r t M a r k d o w n
$( Q) ./report-status.sh " $( 1) " " $( OUTPUT_DIR) " markdown " diff/dotnet/Microsoft. $( 1) .Ref/ref/ $( DOTNET_TFM) /Microsoft. $( 1) .html " " diff/dotnet/Microsoft. $( 1) .Ref/ref/ $( DOTNET_TFM) /Microsoft. $( 1) .md " " $( 2) "
2021-10-15 20:04:35 +03:00
2022-06-09 16:47:00 +03:00
e n d e f
2022-10-19 15:39:51 +03:00
all-markdowns :: $( OUTPUT_DIR ) /api -diff .md
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/api-diff.md : $( API_DIFF_DEPENDENCIES )
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
$( Q) if $( foreach html,$( wildcard $( OUTPUT_DIR) /*-api-diff.html) ,! test -s " $( html) " && ) true; then \
echo "<details><summary>Legacy Xamarin (empty diffs)</summary>" >> " $@ " ; \
elif grep BreakingChangesDetected " $( OUTPUT_DIR) " /*-api-diff.html & > /dev/null; then \
echo " <details><summary>Legacy Xamarin ( $( MARKDOWN_BREAKING_CHANGES_MESSAGE) )</summary> " >> " $@ " ; \
else \
echo " <details><summary>Legacy Xamarin ( $( MARKDOWN_NO_BREAKING_CHANGES_MESSAGE) )</summary> " >> " $@ " ; \
fi
$( Q) echo "" >> $@
2021-10-15 20:04:35 +03:00
i f d e f I N C L U D E _ I O S
2022-06-09 16:47:00 +03:00
$( Q) ./report-status.sh "iOS" " $( OUTPUT_DIR) " markdown "ios-api-diff.html" "ios-api-diff.md" " $@ "
2021-10-15 20:04:35 +03:00
e n d i f
2022-05-13 21:43:39 +03:00
i f d e f I N C L U D E _ T V O S
2022-06-09 16:47:00 +03:00
$( Q) ./report-status.sh "tvOS" " $( OUTPUT_DIR) " markdown "tvos-api-diff.html" "tvos-api-diff.md" " $@ "
e n d i f
i f d e f I N C L U D E _ W A T C H
$( Q) ./report-status.sh "watchOS" " $( OUTPUT_DIR) " markdown "watchos-api-diff.html" "watchos-api-diff.md" " $@ "
2021-10-15 20:04:35 +03:00
e n d i f
i f d e f I N C L U D E _ M A C
2022-06-09 16:47:00 +03:00
$( Q) ./report-status.sh "macOS" " $( OUTPUT_DIR) " markdown "mac-api-diff.html" "mac-api-diff.md" " $@ "
2021-10-15 20:04:35 +03:00
e n d i f
2022-06-09 16:47:00 +03:00
$( Q) echo "" >> $@
$( Q) echo "</details>" >> " $@ "
$( Q) echo "" >> $@
e n d i f # INCLUDE_XAMARIN_LEGACY
i f d e f E N A B L E _ D O T N E T
$( Q) if $( foreach html,$( wildcard $( OUTPUT_DIR) /diff/dotnet/Microsoft.*.Ref/ref/$( DOTNET_TFM) /Microsoft.*.html) ,! test -s " $( html) " && ) true; then \
echo "<details><summary>NET (empty diffs)</summary>" >> " $@ " ; \
elif grep BreakingChangesDetected " $( OUTPUT_DIR) " /diff/dotnet/Microsoft.*.Ref/ref/" $( DOTNET_TFM) " /Microsoft.*.html & > /dev/null; then \
echo " <details><summary>.NET ( $( MARKDOWN_BREAKING_CHANGES_MESSAGE) )</summary> " >> " $@ " ; \
else \
echo " <details><summary>.NET ( $( MARKDOWN_NO_BREAKING_CHANGES_MESSAGE) )</summary> " >> " $@ " ; \
fi
$( Q) echo "" >> $@
2021-10-15 20:04:35 +03:00
2022-06-09 16:47:00 +03:00
@# New .NET vs Stable .NET
$( Q) $( foreach platform,$( DOTNET_PLATFORMS) ,$( call ApiDiffReportMarkdown,$( platform) ,$@ ) )
@# .NET: Microsoft.iOS vs Microsoft.MacCatalyst
i f d e f I N C L U D E _ I O S _ V S _ M A C C A T A L Y S T
$( Q) echo " * Microsoft.iOS vs Microsoft.MacCatalyst: [vsdrops](diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.MacCatalyst.html) [gist](diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.MacCatalyst.md) " >> $@
e n d i f # INCLUDE_IOS_VS_MACCATALYST
$( Q) echo "" >> $@
$( Q) echo "</details>" >> " $@ "
$( Q) echo "" >> $@
@# .NET vs legacy ( stable)
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
i f d e f I N C L U D E _ X A M A R I N _ V S _ D O T N E T
$( Q) echo "<details><summary>Legacy Xamarin (stable) vs .NET</summary>" >> " $@ "
$( Q) echo "" >> $@
i f d e f I N C L U D E _ I O S
$( Q) echo " * iOS: [vsdrops](diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.html) [gist](diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.iOS.md) " >> $@
2021-10-15 20:04:35 +03:00
e n d i f
2022-06-09 16:47:00 +03:00
i f d e f I N C L U D E _ T V O S
$( Q) echo " * tvOS: [vsdrops](diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.tvOS.html) [gist](diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.tvOS.md) " >> $@
e n d i f
i f d e f I N C L U D E _ M A C
$( Q) echo " * macOS: [vsdrops](diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.macOS.html) [gist](diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/ $( DOTNET_TFM) /Microsoft.macOS.md) " >> $@
2021-10-15 20:04:35 +03:00
e n d i f
2022-06-09 16:47:00 +03:00
$( Q) echo "" >> $@
$( Q) echo "</details>" >> " $@ "
$( Q) echo "" >> $@
e n d i f # INCLUDE_XAMARIN_VS_DOTNET
e n d i f # INCLUDE_XAMARIN_LEGACY
e n d i f # DOTNET
$( Q) if grep " $( MARKDOWN_BREAKING_CHANGES_MESSAGE) " $@ >/dev/null 2>& 1; then \
echo "" >> $@ ; \
echo "<!-- BreakingChangesDetected -->" >> $@ ; \
echo "" >> $@ ; \
fi
2021-10-15 20:04:35 +03:00
2016-04-21 16:06:16 +03:00
# easy-to-type helper targets.
# one rule to create all the api diffs
2022-10-17 10:26:48 +03:00
all-local :: $( OUTPUT_DIR ) /index .html $( OUTPUT_DIR ) /api -diff .md
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
all-local :: all -markdowns
e n d i f
2016-04-21 16:06:16 +03:00
2021-11-08 18:15:58 +03:00
# Rules to re-create the reference infos from the current stable 'bundle.zip' assemblies
# First download the bundle zips we need. Multiple platforms may (or may not) share the same bundle.zip (with the same url),
# so account for that and only download each bundle.zip once.
APIDIFF_URLS = $( APIDIFF_REFERENCES_iOS) $( APIDIFF_REFERENCES_Mac) $( foreach platform,$( DOTNET_PLATFORMS) ,$( APIDIFF_REFERENCES_DOTNET_$( platform) ) )
APIDIFF_UNIQUE_URLS = $( sort $( APIDIFF_URLS) )
APIDIFF_UNIQUE_HASHES = $( foreach url,$( APIDIFF_UNIQUE_URLS) ,$( word 5,$( subst /, ,$( url) ) ) )
d e f i n e D o w n l o a d B u n d l e
BUNDLE_ZIP_$(1) = $( APIDIFF_DIR) /bundle-$( 1) .zip
BUNDLE_ZIP_$(1)_URL = $( shell echo $( APIDIFF_UNIQUE_URLS) | tr ' ' '\n' | grep '/$(1)/' )
$$ (BUNDLE_ZIP_$(1)) :
@# download to a temporary filename so interrupted downloads won' t prevent re-downloads.
@echo " Downloading $$ (BUNDLE_ZIP_ $( 1) _URL)... "
2021-10-15 20:04:35 +03:00
$$ ( Q) if test -f ~/Library/Caches/xamarin-macios/$$ ( notdir $$ @) ; then \
2021-11-08 18:15:58 +03:00
echo " Found a cached version of $$ (notdir $$ @) in ~/Library/Caches/xamarin-macios/ $$ (notdir $$ @). " ; \
2021-10-15 20:04:35 +03:00
$$ ( CP) ~/Library/Caches/xamarin-macios/$$ ( notdir $$ @) $$ @.tmp; \
else \
2021-11-08 18:15:58 +03:00
curl -f -L $$ ( if $$ ( V) ,-v,-s) " $$ (BUNDLE_ZIP_ $( 1) _URL) " --output $$ @.tmp; \
if [ [ " x $$ $$ MACIOS_CACHE_DOWNLOADS " != "x" ] ] ; then \
mkdir -p ~/Library/Caches/xamarin-macios/; \
$$ ( CP) $$ @.tmp ~/Library/Caches/xamarin-macios/" $$ (notdir $$ @) " ; \
echo " Cached the download of $$ (notdir $$ @) in ~/Library/Caches/xamarin-macios " ; \
fi ; \
2021-10-15 20:04:35 +03:00
fi
$$ ( Q) mv $$ @.tmp $$ @
2021-11-08 18:15:58 +03:00
BUNDLE_ZIPS += $$ ( BUNDLE_ZIP_$( 1) )
e n d e f
$( foreach hash ,$ ( APIDIFF_UNIQUE_HASHES ) ,$ ( eval $ ( call DownloadBundle ,$ ( hash ) ) ) )
download : $( BUNDLE_ZIPS )
# Here we unzip the downloaded bundle.
d e f i n e U n z i p B u n d l e
UNZIP_STAMP_$(1) = $( APIDIFF_DIR) /.unzip.$( 1) .stamp
UNZIP_DIR_$(1) = temp/downloads/$( 1)
$$ (UNZIP_STAMP_$(1)) : $$( BUNDLE_ZIP_ $ ( 1) )
$$ ( Q) rm -Rf " $$ (UNZIP_DIR_ $( 1) ) "
$$ ( Q) mkdir -p $$ ( dir $$ ( UNZIP_DIR_$( 1) ) )
$$ ( Q_GEN) unzip $$ ( if $$ ( V) ,,-q) -d $$ ( UNZIP_DIR_$( 1) ) $$ <
2021-10-15 20:04:35 +03:00
$$ ( Q) touch $$ @
2021-11-08 18:15:58 +03:00
# the semi-colon at the end means an empty recipe, and is required for make to consider pattern rules
$$ (UNZIP_DIR_$(1))/%.dll : $$( UNZIP_STAMP_ $ ( 1) ) ;
UNZIP_STAMPS += $$ ( UNZIP_STAMP_$( 1) )
2021-10-15 20:04:35 +03:00
e n d e f
2021-11-08 18:15:58 +03:00
$( foreach hash ,$ ( APIDIFF_UNIQUE_HASHES ) ,$ ( eval $ ( call UnzipBundle ,$ ( hash ) ) ) )
2021-10-29 16:51:55 +03:00
2021-11-08 18:15:58 +03:00
unzip : $( UNZIP_STAMPS )
# Compute the unzip dir per platform
APIDIFF_HASH_iOS = $( word 5,$( subst /, ,$( APIDIFF_REFERENCES_iOS) ) )
UNZIP_DIR_iOS = $( UNZIP_DIR_$( APIDIFF_HASH_iOS) )
UNZIP_STAMP_iOS = $( UNZIP_STAMP_$( APIDIFF_HASH_iOS) )
APIDIFF_HASH_Mac = $( word 5,$( subst /, ,$( APIDIFF_REFERENCES_Mac) ) )
UNZIP_DIR_Mac = $( UNZIP_DIR_$( APIDIFF_HASH_Mac) )
UNZIP_STAMP_Mac = $( UNZIP_STAMP_$( APIDIFF_HASH_Mac) )
2021-10-15 20:04:35 +03:00
2021-11-08 18:15:58 +03:00
d e f i n e D o t N e t U n z i p D i r e c t o r y
APIDIFF_HASH_DOTNET_$(1) = $$ ( word 5,$$ ( subst /, ,$$ ( APIDIFF_REFERENCES_DOTNET_$( 1) ) ) )
UNZIP_DIR_DOTNET_$(1) = $$ ( UNZIP_DIR_$$ ( APIDIFF_HASH_DOTNET_$( 1) ) )
2021-10-15 20:04:35 +03:00
e n d e f
2021-11-08 18:15:58 +03:00
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call DotNetUnzipDirectory ,$ ( platform ) ) ) )
2021-10-15 20:04:35 +03:00
2021-11-08 18:15:58 +03:00
# the semi-colon at the end means an empty recipe, and is required for make to consider pattern rules
$(UNZIP_DIR_Mac)/%.dll : $( UNZIP_STAMP_Mac ) ;
$(UNZIP_DIR_iOS)/%.dll : $( UNZIP_STAMP_iOS ) ;
2021-10-15 20:04:35 +03:00
2018-02-09 15:07:22 +03:00
IOS_REFS = $( foreach file,$( IOS_ASSEMBLIES) ,$( APIDIFF_DIR) /updated-references/xi/$( file) .xml)
MAC_REFS = $( foreach file,$( MAC_ASSEMBLIES) ,$( APIDIFF_DIR) /updated-references/xm/$( file) .xml)
WATCHOS_REFS = $( foreach file,$( WATCHOS_ASSEMBLIES) ,$( APIDIFF_DIR) /updated-references/xi/$( file) .xml)
TVOS_REFS = $( foreach file,$( TVOS_ASSEMBLIES) ,$( APIDIFF_DIR) /updated-references/xi/$( file) .xml)
2021-12-01 19:27:18 +03:00
DOTNET_REFS = $( foreach file,$( DOTNET_ASSEMBLIES) ,$( APIDIFF_DIR) /updated-references/dotnet/$( file) .xml)
2016-04-21 16:06:16 +03:00
2021-11-08 18:15:58 +03:00
$(APIDIFF_DIR)/references/xi/%.xml : $( UNZIP_DIR_iOS ) /%.dll $( MONO_API_INFO )
2018-02-09 15:07:22 +03:00
$( Q) mkdir -p $( dir $@ ) $( dir $( APIDIFF_DIR) /references/xi/$* )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $( APIDIFF_DIR) /references/xi/$* .xml)
2016-04-21 16:06:16 +03:00
2019-03-01 04:49:10 +03:00
$(APIDIFF_DIR)/updated-references/xi/%.xml : $( IOS_DESTDIR ) $( MONOTOUCH_PREFIX ) /lib /mono /%.dll $( MONO_API_INFO )
2019-03-03 20:46:47 +03:00
$( Q) mkdir -p $( dir $@ ) $( dir $( APIDIFF_DIR) /references/xi/$* )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $( APIDIFF_DIR) /references/xi/$* .xml)
2019-03-01 04:49:10 +03:00
2021-11-08 18:15:58 +03:00
$(APIDIFF_DIR)/references/xm/%.xml : $( UNZIP_DIR_Mac ) /%.dll $( MONO_API_INFO )
2018-02-09 15:07:22 +03:00
$( Q) mkdir -p $( dir $@ ) $( dir $( APIDIFF_DIR) /references/xm/$* )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $( APIDIFF_DIR) /references/xm/$* .xml)
2016-04-21 16:06:16 +03:00
2019-03-01 04:49:10 +03:00
$(APIDIFF_DIR)/updated-references/xm/%.xml : $( MAC_DESTDIR ) $( MAC_FRAMEWORK_CURRENT_DIR ) /lib /mono /%.dll $( MONO_API_INFO )
$( Q) mkdir -p $( dir $@ ) $( dir $( APIDIFF_DIR) /references/xm/$* )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) -d $( dir $<) $( abspath $<) -o $( abspath $( APIDIFF_DIR) /references/xm/$* .xml)
2019-03-01 04:49:10 +03:00
2021-10-15 20:04:35 +03:00
# The dotnet references xmls may come from different hashes, so we need to have separate rules for all of them
2022-05-06 09:15:37 +03:00
$(APIDIFF_DIR)/references/dotnet/Microsoft.iOS.Ref/ref/$(DOTNET_TFM)/Microsoft.iOS.xml : $( UNZIP_DIR_DOTNET_iOS ) /Microsoft .iOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .iOS .dll $( MONO_API_INFO )
2021-10-15 20:04:35 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2021-10-15 20:04:35 +03:00
2022-05-06 09:15:37 +03:00
$(APIDIFF_DIR)/references/dotnet/Microsoft.macOS.Ref/ref/$(DOTNET_TFM)/Microsoft.macOS.xml : $( UNZIP_DIR_DOTNET_macOS ) /Microsoft .macOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .macOS .dll $( MONO_API_INFO )
2021-10-15 20:04:35 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2021-10-15 20:04:35 +03:00
2022-05-06 09:15:37 +03:00
$(APIDIFF_DIR)/references/dotnet/Microsoft.MacCatalyst.Ref/ref/$(DOTNET_TFM)/Microsoft.MacCatalyst.xml : $( UNZIP_DIR_DOTNET_MacCatalyst ) /Microsoft .MacCatalyst .Ref /ref /$( DOTNET_TFM ) /Microsoft .MacCatalyst .dll $( MONO_API_INFO )
2021-10-15 20:04:35 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2021-10-15 20:04:35 +03:00
2022-05-06 09:15:37 +03:00
$(APIDIFF_DIR)/references/dotnet/Microsoft.tvOS.Ref/ref/$(DOTNET_TFM)/Microsoft.tvOS.xml : $( UNZIP_DIR_DOTNET_tvOS ) /Microsoft .tvOS .Ref /ref /$( DOTNET_TFM ) /Microsoft .tvOS .dll $( MONO_API_INFO )
2021-10-15 20:04:35 +03:00
$( Q) mkdir -p $( dir $@ )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $@ )
2021-10-15 20:04:35 +03:00
$(APIDIFF_DIR)/updated-references/dotnet/%.xml : $( DOTNET_DESTDIR ) /%.dll $( MONO_API_INFO )
2021-12-15 07:19:36 +03:00
$( Q) mkdir -p $( dir $@ ) $( dir $( APIDIFF_DIR) /references/dotnet/$* )
2022-05-09 23:12:03 +03:00
$( QF_GEN) $( MONO_API_INFO_EXEC) $( abspath $<) -o $( abspath $( APIDIFF_DIR) /references/dotnet/$* .xml)
2021-10-15 20:04:35 +03:00
2019-03-01 04:49:10 +03:00
update-tvos-refs : $( TVOS_REFS )
update-watchos-refs : $( WATCHOS_REFS )
update-ios-refs : $( IOS_REFS )
update-mac-refs : $( MAC_REFS )
2021-10-15 20:04:35 +03:00
i f d e f E N A B L E _ D O T N E T
update-dotnet : $( DOTNET_REFS )
e n d i f
2019-03-01 04:49:10 +03:00
2022-10-18 09:11:24 +03:00
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
2022-09-21 15:24:13 +03:00
i f d e f I N C L U D E _ I O S
update-refs : $( IOS_REFS )
e n d i f
i f d e f I N C L U D E _ T V O S
update-refs : $( TVOS_REFS )
e n d i f
i f d e f I N C L U D E _ W A T C H
update-refs : $( WATCHOS_REFS )
e n d i f
i f d e f I N C L U D E _ M A C
update-refs : $( MAC_REFS )
e n d i f
2022-10-18 09:11:24 +03:00
e n d i f
2022-09-21 15:24:13 +03:00
2021-10-15 20:04:35 +03:00
i f d e f E N A B L E _ D O T N E T
update-refs : $( DOTNET_REFS )
e n d i f
2019-03-01 04:49:10 +03:00
2016-04-21 16:06:16 +03:00
clean-local ::
2021-10-15 20:04:35 +03:00
rm -rf temp references updated-references diff dotnet *.exe* api-diff.html
2021-11-08 18:15:58 +03:00
rm -rf *.dll* bundle-*.zip $( UNZIP_STAMPS)
2021-10-15 20:04:35 +03:00
rm -rf ios-*.md tvos-*.md watchos-*.md macos-*.md dotnet-*.md
2016-04-21 16:06:16 +03:00
2022-06-09 16:47:00 +03:00
DIRS += $( APIDIFF_DIR) /temp $( OUTPUT_DIR) /diff
2016-04-21 16:06:16 +03:00
# dir creation target
$(DIRS) :
$( Q) mkdir -p $@
2022-06-09 16:47:00 +03:00
# make will automatically consider files created in chained implicit rules as temporary files, and delete them afterwards
2019-05-22 15:41:18 +03:00
# defining a .SECONDARY rule will prevent that deletion.
.SECONDARY :
2016-04-21 16:06:16 +03:00
2018-04-10 15:39:19 +03:00
merger.exe : merger .cs
2022-06-09 16:47:00 +03:00
$( Q) $( SYSTEM_CSC) -debug $< -out:$@ /nologo
2018-04-10 15:39:19 +03:00
2022-10-17 10:26:48 +03:00
i f d e f I N C L U D E _ X A M A R I N _ L E G A C Y
2018-04-10 15:39:19 +03:00
i f d e f I N C L U D E _ I O S
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/ios-api-diff.md : merger .exe $( foreach file ,$ ( IOS_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xi /$ ( file ) .md )
$( Q) $( SYSTEM_MONO) --debug merger.exe Xamarin.iOS $( OUTPUT_DIR) /diff/xi/Xamarin.iOS/ ios $( abspath $@ )
all-markdowns :: $( OUTPUT_DIR ) /ios -api -diff .md
2018-04-10 15:39:19 +03:00
e n d i f
i f d e f I N C L U D E _ T V O S
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/tvos-api-diff.md : merger .exe $( foreach file ,$ ( TVOS_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xi /$ ( file ) .md )
$( Q) $( SYSTEM_MONO) --debug merger.exe Xamarin.TVOS $( OUTPUT_DIR) /diff/xi/Xamarin.TVOS/ tvos $( abspath $@ )
all-markdowns :: $( OUTPUT_DIR ) /tvos -api -diff .md
2018-04-10 15:39:19 +03:00
e n d i f
i f d e f I N C L U D E _ W A T C H
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/watchos-api-diff.md : merger .exe $( foreach file ,$ ( WATCHOS_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xi /$ ( file ) .md )
$( Q) $( SYSTEM_MONO) --debug merger.exe Xamarin.WatchOS $( OUTPUT_DIR) /diff/xi/Xamarin.WatchOS/ watchos $( abspath $@ )
all-markdowns :: $( OUTPUT_DIR ) /watchos -api -diff .md
2021-03-04 03:41:00 +03:00
e n d i f
2018-04-10 15:39:19 +03:00
i f d e f I N C L U D E _ M A C
2022-06-09 16:47:00 +03:00
$(OUTPUT_DIR)/mac-api-diff.md : merger .exe $( foreach file ,$ ( MAC_ASSEMBLIES ) ,$ ( OUTPUT_DIR ) /diff /xm /$ ( file ) .md )
$( Q) $( SYSTEM_MONO) --debug merger.exe Xamarin.Mac $( OUTPUT_DIR) /diff/xm/Xamarin.Mac/ macos $( abspath $@ )
all-markdowns :: $( OUTPUT_DIR ) /mac -api -diff .md
2021-10-15 20:04:35 +03:00
e n d i f
2022-10-17 10:26:48 +03:00
e n d i f