-
Notifications
You must be signed in to change notification settings - Fork 516
/
Make.config
642 lines (545 loc) · 32.7 KB
/
Make.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
include $(TOP)/mk/subdirs.mk
# Common cURL command:
# --fail: return an exit code if the connection succeeded, but returned an HTTP error code.
# --location: follow redirects
# --connect-timeout: if a connection doesn't happen within 15 seconds, then fail (and potentially retry). This is lower than the default to not get stuck waiting for a long time in case something goes wrong (but instead retry).
# --verbose / --silent: no explanation needed.
# --show-error: show an error to the terminal even if asked to be --silent.
CURL = curl --fail --location --connect-timeout 15 $(if $(V),--verbose,--silent) --show-error
# --retry: retry download 20 times
# --retry-delay: wait 2 seconds between each retry attempt
# --retry-all-errors: ignore the definition of insanity and retry even for errors that seem like you'd get the same result (such as 404). This isn't the real purpose, because this will also retry errors that will get a different result (such as connection failures / resets), which apparently --retry doesn't cover.
CURL_RETRY = $(CURL) --retry 20 --retry-delay 2 --retry-all-errors
DOTNET_TFM=net9.0
DOTNET_MAJOR_VERSION:=$(firstword $(subst ., ,$(subst net,,$(DOTNET_TFM))))
# calculate commit distance and store it in a file so that we don't have to re-calculate it every time make is executed.
# Support for hardcoding a commit distance start offset.
#
# The default is to add X000, where X is the major .NET version: we need to
# publish different versions of our NuGets for different .NET version
# (example: we need to publish one NuGet with support for Xcode 14.3 for .NET
# 6, and another one for .NET 7) - and these need to have different versions,
# and ordered correctly (the .NET 7 version must have a higher version than
# the .NET 6 version), and ideally it would be possible to just look at the
# version to see which .NET version it's targeting. Adding X000 to the commit
# distance accomplishes all these goals (as long as the commit distance itself
# doesn't need more than 3 digits).
NUGET_VERSION_COMMIT_DISTANCE_START=$(DOTNET_MAJOR_VERSION)000
NUGET_VERSION_STABLE_COMMIT_DISTANCE_START=$(DOTNET_MAJOR_VERSION)000
-include $(TOP)/Make.config.inc
$(TOP)/Make.config.inc: $(TOP)/Make.config $(TOP)/mk/mono.mk
$(Q) cd $(TOP) && \
ALL_DOTNET_PLATFORMS="$(ALL_DOTNET_PLATFORMS)" \
NUGET_VERSION_COMMIT_DISTANCE_START=$(NUGET_VERSION_COMMIT_DISTANCE_START) \
NUGET_VERSION_STABLE_COMMIT_DISTANCE_START=$(NUGET_VERSION_STABLE_COMMIT_DISTANCE_START) \
./create-make-config.sh
include $(TOP)/Make.versions
# These versions are used to compute the API diff between the current commit and our current stable release.
# The value is taken from the name + version of the Ref pack.
# Example: given the Ref pack "Microsoft.iOS.Ref.net8.0_17.5" with the version "17.5.8030", the value
# to write here would be the part after "Microsoft.iOS.Ref." + "/" + version: "net8.0_17.5/17.5.8030"
STABLE_NUGET_VERSION_iOS=net9.0_18.0/18.0.9617
STABLE_NUGET_VERSION_tvOS=net9.0_18.0/18.0.9617
STABLE_NUGET_VERSION_MacCatalyst=net9.0_18.0/18.0.9617
STABLE_NUGET_VERSION_macOS=net9.0_15.0/15.0.9617
PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)
#
# /!\ README /!\
#
# A release branch requires updating some variables.
# This is done in Make.versions, not here.
#
ifneq ($(BUILD_SOURCEBRANCH),)
# BUILD_SOURCEBRANCH is set in Azure DevOps, so use that value if it exists
# it seems to always start with refs/heads/, so strip off that first.
CURRENT_BRANCH:=$(subst refs/heads/,,${BUILD_SOURCEBRANCH})
else ifeq ($(BRANCH_NAME),)
# BRANCH_NAME is set in Jenkins, so this is for local builds.
CURRENT_BRANCH:=$(shell git rev-parse --abbrev-ref HEAD)
else
CURRENT_BRANCH:=$(BRANCH_NAME)
endif
CURRENT_BRANCH_SED_ESCAPED:=$(subst |,\|,$(subst &,\&,$(subst $$,\$$,$(subst /,\/,$(CURRENT_BRANCH)))))
# The branch name in the nuget version has to be alphanumeric, and we follow the semantic versioning spec,
# which defines "alphanumeric" as the letters, numbers and the dash character (and nothing else).
# So here we replace all non-alphanumeric characters in the branch name with a dash.
CURRENT_BRANCH_ALPHANUMERIC:=$(shell export LANG=C; printf "%s" "$(CURRENT_BRANCH)" | tr -c '[a-zA-Z0-9-]' '-')
# Set proper path for git directory
# If the repo is checked out as a worktree, the default .git/ does not exist,
# instead there is a .git file containing the path to the correct .git/
GIT_DIRECTORY:=$(TOP)/.git
ALTERNATIVE_GIT:=$(shell sed -n 's/^ *gitdir: //p' $(GIT_DIRECTORY))
ifneq ($(ALTERNATIVE_GIT),)
GIT_DIRECTORY:=$(ALTERNATIVE_GIT)
endif
# Get the current hash
CURRENT_HASH:=$(shell git log -1 --pretty=%h)
CURRENT_HASH_LONG:=$(shell git log -1 --pretty=%H)
# Get the pull request number, if this is a pull request
# Jenkins may set either CHANGE_ID or ghprbPullId
# Azure Devops sets SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
ifneq ($(CHANGE_ID),)
PULL_REQUEST_ID=$(CHANGE_ID)
else ifneq ($(ghprbPullId),)
PULL_REQUEST_ID=$(ghprbPullId)
else ifneq ($(SYSTEM_PULLREQUEST_PULLREQUESTNUMBER),)
PULL_REQUEST_ID=$(SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)
endif
# We have three types of branches:
#
# 1. Release (stable) branches. These have stable versioning (no prerelease identifiers).
# 2. Pre-release branches. These have stable versioning + prerelease identifiers.
# 3. Any other branches, These have CI/PR versioning.
#
# * A PR branch (case 3 above) is identified by the PULL_REQUEST_ID variable
# (set in the environment). This takes precedence over any other variable.
# * Otherwise a release branch (case 1 above) is identified by setting the
# NUGET_RELEASE_BRANCH variable to the name of the release branch (this
# seems redundant: why should a branch name itself? but it's important if
# another branch is created from the release branch: that other branch might
# be any other random branch for whatever purpose, and shouldn't be
# considered a release branch just because someone forgot to unset a
# variable).
# * Otherwise a prerelease branch (case 2 above) is identified by the
# NUGET_HARDCODED_PRERELEASE_IDENTIFIER variable, which is used to hardcode
# a prerelease version. Note that NUGET_HARDCODED_PRERELEASE_BRANCH must
# also be set to the name of the current branch, otherwise
# NUGET_HARDCODED_PRERELEASE_IDENTIFIER will be ignored.
# * Otherwise we're a CI branch (case 3 above).
## If this branch is a release branch, set NUGET_RELEASE_BRANCH to the exact branch name (so that any other branches won't become release branches just by branching off from a release branch).
## Example: release/6.0.3xx
# NUGET_RELEASE_BRANCH=
## If this is a pre-release (alpha, beta, rc, xcode, etc.) branch, set NUGET_HARDCODED_PRERELASE_BRANCH to the exact branch name. Also set NUGET_HARDCODED_PRELEASE_IDENTIFIER to the prerelease identifier to use.
## Example:
## NUGET_HARDCODED_PRERELEASE_BRANCH=release/6.0.3xx-rc3
## NUGET_HARDCODED_PRERELEASE_IDENTIFIER=rc.3
## Example 2: we might sometimes make 'main' a prerelease branch:
## NUGET_HARDCODED_PRERELEASE_BRANCH=main
## NUGET_HARDCODED_PRERELEASE_IDENTIFIER=rc.4
## In this case, when we create an actual rc4 branch, the value for
## NUGET_HARDCODED_PRERELEASE_IDENTIFIER in main must be changed to "rc.5" (or
## anything else), while the value for NUGET_HARDCODED_PRERELEASE_BRANCH in
## the rc4 branch will become the rc4 branch name. The value in main must
## change *first*, otherwise we'll produce builds with the same version from
## two different branches (which is very, very bad).
##
## Note that the prerelease identifier should be as short as possible, because otherwise
## the resulting package name can become too long for MSIs.
NUGET_HARDCODED_PRERELEASE_IDENTIFIER=net9-rtm
NUGET_HARDCODED_PRERELEASE_BRANCH=net9.0
# compute the alphanumeric version of branch names
NUGET_RELEASE_BRANCH_ALPHANUMERIC:=$(shell export LANG=C; printf "%s" "$(NUGET_RELEASE_BRANCH)" | tr -c '[a-zA-Z0-9-]' '-')
NUGET_HARDCODED_PRERELEASE_BRANCH_ALPHANUMERIC:=$(shell export LANG=C; printf "%s" "$(NUGET_HARDCODED_PRERELEASE_BRANCH)" | tr -c '[a-zA-Z0-9-]' '-')
# Compute the prerelease identifier based on the variables above
# DO NOT MODIFY THE BELOW CONDITIONS TO HARDCODE A VERSION NUMBER FOR (PRE)RELEASE BRANCHES.
# READ INSTRUCTIONS ABOVE INSTEAD.
ifneq ($(PULL_REQUEST_ID),)
# we're a PR, so PR versioning
NUGET_PRERELEASE_IDENTIFIER=-ci.pr.gh$(PULL_REQUEST_ID)
else ifeq ($(NUGET_RELEASE_BRANCH_ALPHANUMERIC),$(CURRENT_BRANCH_ALPHANUMERIC))
# this is a release branch, so no prerelease identifier
NUGET_PRERELEASE_IDENTIFIER=
else ifeq ($(NUGET_HARDCODED_PRERELEASE_BRANCH_ALPHANUMERIC),$(CURRENT_BRANCH_ALPHANUMERIC))
# this is a prerelease branch!
NUGET_PRERELEASE_IDENTIFIER=-$(NUGET_HARDCODED_PRERELEASE_IDENTIFIER)
else ifeq (release-test/rt/,$(patsubst release-test/rt/%,release-test/rt/,$(CURRENT_BRANCH)))
# this is a release-testing branch!
NUGET_PRERELEASE_IDENTIFIER=-rt
else
# this is a CI branch!
NUGET_PRERELEASE_IDENTIFIER=-ci.$(CURRENT_BRANCH_ALPHANUMERIC)
endif
NUGET_BUILD_METADATA=
IOS_PRODUCT=Xamarin.iOS
IOS_PACKAGE_NAME=Xamarin.iOS
IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_REV:=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
IOS_NUGET=Microsoft.iOS
IOS_NUGET_VERSION=$(IOS_NUGET_OS_VERSION).$(IOS_NUGET_COMMIT_DISTANCE)
IOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_NUGET_VERSION)))
IOS_NUGET_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_NUGET_VERSION)))
IOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(IOS_NUGET_VERSION)))
IOS_NUGET_VERSION_NO_METADATA=$(IOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
IOS_NUGET_VERSION_FULL=$(IOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
IOS_WINDOWS_NUGET=Microsoft.iOS.Windows
IOS_WINDOWS_NUGET_VERSION_MAJOR=$(IOS_NUGET_VERSION_MAJOR)
IOS_WINDOWS_NUGET_VERSION_MINOR=$(IOS_NUGET_VERSION_MINOR)
IOS_WINDOWS_NUGET_VERSION_PATCH=$(IOS_NUGET_VERSION_PATCH)
IOS_WINDOWS_NUGET_VERSION_NO_METADATA=$(IOS_NUGET_VERSION_NO_METADATA)
IOS_WINDOWS_NUGET_VERSION_FULL=$(IOS_NUGET_VERSION_FULL)
TVOS_NUGET=Microsoft.tvOS
TVOS_NUGET_VERSION=$(TVOS_NUGET_OS_VERSION).$(TVOS_NUGET_COMMIT_DISTANCE)
TVOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(TVOS_NUGET_VERSION)))
TVOS_NUGET_VERSION_MINOR=$(word 2, $(subst ., ,$(TVOS_NUGET_VERSION)))
TVOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(TVOS_NUGET_VERSION)))
TVOS_NUGET_VERSION_NO_METADATA=$(TVOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
TVOS_NUGET_VERSION_FULL=$(TVOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
MACCATALYST_NUGET=Microsoft.MacCatalyst
MACCATALYST_NUGET_VERSION=$(MACCATALYST_NUGET_OS_VERSION).$(MACCATALYST_NUGET_COMMIT_DISTANCE)
MACCATALYST_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(MACCATALYST_NUGET_VERSION)))
MACCATALYST_NUGET_VERSION_MINOR=$(word 2, $(subst ., ,$(MACCATALYST_NUGET_VERSION)))
MACCATALYST_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(MACCATALYST_NUGET_VERSION)))
MACCATALYST_NUGET_VERSION_NO_METADATA=$(MACCATALYST_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=16.2
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_16.2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_16.2.0.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist 2>/dev/null || echo " $(shell tput setaf 1 2>/dev/null)The required Xcode ($(XCODE_VERSION)) is not installed in $(basename $(basename $(XCODE_DEVELOPER_ROOT)))$(shell tput sgr0 2>/dev/null)" >&2)
# We define stable Xcode as the Xcode app being named like "Xcode_#.#[.#].app"
# and any other naming is deemed to be a beta. This is the safer approach: any
# errors are likely to be Xcode classified as a beta, when it's not, and in that
# case we'll accidentally release a prerelease version. This is not a problem:
# we fix it, and release the fixed version to stable. The opposite scenario is
# worse: when we release something as stable when it shouldn't be, so let's
# try to avoid that.
ifeq (OK,$(shell echo $(notdir $(abspath $(dir $(abspath $(dir $(XCODE_DEVELOPER_ROOT)))))) | sed -e 's/^Xcode[_0-9.]*[.]app$$/OK/'))
XCODE_IS_STABLE=true
XCODE_IS_PREVIEW=false
else
XCODE_IS_STABLE=false
XCODE_IS_PREVIEW=true
endif
# Tell both Xcode and our build logic which Xcode we're using.
export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
export MD_APPLE_SDK_ROOT=$(abspath $(XCODE_DEVELOPER_ROOT)/../..)
# We don't need to be told there are workload updates
export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE=true
# We don't need to be told we're using preview packages (we pretty much always are).
export SuppressNETCoreSdkPreviewMessage=true
# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
include $(TOP)/mk/mono.mk
MONO_HASH := $(NEEDED_MONO_VERSION)
# Minimum Mono version for building XI/XM
MIN_MONO_VERSION=6.12.0.179
MAX_MONO_VERSION=6.12.99
MIN_MONO_URL=https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.179.macos10.xamarin.universal.pkg
# Minimum Mono version for Xamarin.Mac apps using the system mono
MIN_XM_MONO_VERSION=6.4.0.94
# ObjectiveSharpie min/max versions
MIN_SHARPIE_VERSION=3.5.116
MAX_SHARPIE_VERSION=3.5.999
MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/3a748cc2-780d-403c-88ba-700aa9a2d299/88cbfd86e85f56b4c61e092d0f0b9ad9/objectivesharpie-3.5.116.pkg
# Minimum OSX versions for building XI/XM
MIN_OSX_BUILD_VERSION=13.0
# Minimum OSX version for executing XI/XM tooling.
MIN_OSX_VERSION_FOR_IOS=10.15
MIN_OSX_VERSION_FOR_MAC=10.15
# Bump the *_NUGET_VERSION variables in Make.versions instead, because that makes sure the computed commit distance for the version is correct.
IOS_SDK_VERSION=$(word 1, $(subst ., ,$(IOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(IOS_NUGET_VERSION)))
MACOS_SDK_VERSION=$(word 1, $(subst ., ,$(MACOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(MACOS_NUGET_VERSION)))
TVOS_SDK_VERSION=$(word 1, $(subst ., ,$(TVOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(TVOS_NUGET_VERSION)))
MACCATALYST_SDK_VERSION=$(word 1, $(subst ., ,$(MACCATALYST_NUGET_VERSION))).$(word 2, $(subst ., ,$(MACCATALYST_NUGET_VERSION)))
MAX_IOS_DEPLOYMENT_TARGET=$(IOS_SDK_VERSION)
MAX_TVOS_DEPLOYMENT_TARGET=$(TVOS_SDK_VERSION)
MAX_IOS_SIMULATOR_VERSION=$(IOS_SDK_VERSION)
MAX_TVOS_SIMULATOR_VERSION=$(TVOS_SDK_VERSION)
# Minimum OS versions for running XI/XM apps.
MIN_IOS_SDK_VERSION=12.2
MIN_MACOS_SDK_VERSION=12.0
MIN_TVOS_SDK_VERSION=12.2
MIN_MACCATALYST_SDK_VERSION=15.0
# Minimum OS versions for .NET 9 support
DOTNET_MIN_IOS_SDK_VERSION=12.2
DOTNET_MIN_TVOS_SDK_VERSION=12.2
DOTNET_MIN_MACCATALYST_SDK_VERSION=15.0
DOTNET_MIN_MACOS_SDK_VERSION=12.0
# The min simulator version available in the Xcode we're using
MIN_IOS_SIMULATOR_VERSION=15.0
MIN_TVOS_SIMULATOR_VERSION=15.0
# These are the simulator package ids for the versions above
EXTRA_SIMULATORS=com.apple.pkg.iPhoneSimulatorSDK15_0 com.apple.pkg.AppleTVSimulatorSDK15_0
INCLUDE_IOS=1
INCLUDE_MAC=1
INCLUDE_TVOS=1
INCLUDE_MACCATALYST=1
INCLUDE_DEVICE=1
INCLUDE_HOTRESTART=1
-include $(TOP)/Make.config.local
-include $(TOP)/configure.inc
# misc Xcode tool
CLANG=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
SWIFTC=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
LIPO=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
AR=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
RANLIB=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
# paths to the modules we depend on, as variables, so people can put
# things in other places if they absolutely must.
MONO_PATH=$(TOP)/external/mono
TOUCH_UNIT_PATH=$(TOP)/external/Touch.Unit
XAMARIN_MACDEV_PATH=$(TOP)/external/Xamarin.MacDev
MONOTOUCH_DIALOG_PATH=$(TOP)/external/MonoTouch.Dialog
API_TOOLS_PATH=$(TOP)/external/api-tools
MACCORE_PATH=$(TOP)/../maccore
ADR_PATH=$(TOP)/../macios-adr
MONO_PREFIX ?= /Library/Frameworks/Mono.framework/Versions/Current
SYSTEM_MONO=$(MONO_PREFIX)/bin/mono
SYSTEM_MSBUILD=unset MSBuildExtensionsPath && $(MONO_PREFIX)/bin/msbuild /p:Features=strict /m
PKG_CONFIG=$(MONO_PREFIX)/bin/pkg-config
MAC_PRODUCT=Xamarin.Mac
MAC_PACKAGE_NAME=xamarin.mac
MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_BUILD=$(word 4, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MAJOR_MINOR=$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR)
MAC_PACKAGE_UPDATE_ID=$(shell echo $(subst ., ,$(MAC_PACKAGE_VERSION).$(MAC_PACKAGE_VERSION_BUILD)) | awk '{printf "2%02d%02d%02d%03d",$$1,$$2,$$3,$$4}')
MAC_PACKAGE_TITLE=Xamarin $(MAC_PACKAGE_NAME) $(MAC_PACKAGE_VERSION)
MACOS_NUGET=Microsoft.macOS
MACOS_NUGET_VERSION=$(MACOS_NUGET_OS_VERSION).$(MACOS_NUGET_COMMIT_DISTANCE)
MACOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(MACOS_NUGET_VERSION)))
MACOS_NUGET_VERSION_MINOR=$(word 2, $(subst ., ,$(MACOS_NUGET_VERSION)))
MACOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(MACOS_NUGET_VERSION)))
MACOS_NUGET_VERSION_NO_METADATA=$(MACOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
MACOS_NUGET_VERSION_FULL=$(MACOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
MAC_PACKAGE_FILENAME=$(MAC_PACKAGE_NAME_LOWER)-$(MAC_PACKAGE_VERSION).pkg
MAC_PACKAGE_DMG_FILENAME=$(MAC_PACKAGE_NAME_LOWER)-$(MAC_PACKAGE_VERSION).dmg
MAC_PACKAGE_DMG_DIRNAME="$(MAC_PACKAGE_TITLE)"
MAC_PACKAGE_UTI=com.$(MAC_PACKAGE_NAME_LOWER).pkg
TT = $(DOTNET) tool restore && $(DOTNET) t4
PRODUCT_KEY_PATH?=$(TOP)/product.snk
include $(TOP)/mk/quiet.mk
ifdef ENABLE_XAMARIN
-include $(MACCORE_PATH)/Make.config
endif
JENKINS_RESULTS_DIRECTORY ?= $(abspath $(TOP)/jenkins-results)
# Clone files instead of copying them on APFS file systems. Much faster.
CP:=$(shell df -t apfs / >/dev/null 2>&1 && echo "cp -c" || echo "cp")
MONO_IOS_SDK_DESTDIR:=$(abspath $(TOP)/builds/downloads/mono-ios-sdk-destdir)
# This variable includes all the platforms we support, even those that might be disabled in this build.
ALL_DOTNET_PLATFORMS=iOS macOS tvOS MacCatalyst
# Set this to 1 if the Microsoft.NETCore.App.Ref dependency in eng/Version.Details.xml does *not* specify a CoherentParentDependency on Microsoft.Dotnet.Sdk.Internal.
TRACKING_DOTNET_RUNTIME_SEPARATELY=
-include $(TOP)/dotnet.config
$(TOP)/dotnet.config: $(TOP)/eng/Versions.props $(TOP)/Build.props
$(Q) rm -f $@.tmp
$(Q) grep '<MicrosoftNETSdkPackageVersion>' $(TOP)/eng/Versions.props | sed -e 's/<*\/*MicrosoftNETSdkPackageVersion>//g' -e 's/[ \t]*/DOTNET_VERSION=/' >> $@.tmp
$(Q) grep MicrosoftNETCoreAppRefPackageVersion $(TOP)/eng/Versions.props | sed -e 's/<*\/*MicrosoftNETCoreAppRefPackageVersion>//g' -e 's/[ \t]*/BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION=/' >> $@.tmp
$(Q) grep "<$$(grep EmscriptenWorkloadVersion $(TOP)/eng/Versions.props | sed -e 's_.*>$$[\(]\(.*\)[\)]<.*_\1_')>" $(TOP)/eng/Versions.props | sed -e 's/.*>\(.*\)<.*/EMSCRIPTEN_MANIFEST_PACKAGE_VERSION=\1/' >> $@.tmp
$(Q) $(foreach platform,$(ALL_DOTNET_PLATFORMS),grep '<Microsoft$(platform)SdkPackageVersion>' $(TOP)/eng/Versions.props | sed -e 's/<*\/*Microsoft$(platform)SdkPackageVersion>//g' -e 's/[ \t]*/NET8_$(shell echo $(platform) | tr '[:lower:]' '[:upper:]')_NUGET_VERSION_NO_METADATA=/' >> $@.tmp &&) true
$(Q) grep '<MicrosoftDotNetArcadeSdkPackageVersion>' $(TOP)/eng/Versions.props | sed -e 's/<*\/*MicrosoftDotNetArcadeSdkPackageVersion>//g' -e 's/[ \t]*/ARCADE_VERSION=/' >> $@.tmp
$(Q) mv $@.tmp $@
$(TOP)/Build.props: Make.config
$(Q) rm -f $@.tmp
$(Q) printf "<Project>\n" >> $@.tmp
$(Q) printf "\t<PropertyGroup>\n" >> $@.tmp
ifeq ($(XCODE_IS_STABLE),true)
# do nothing
else ifeq ($(XCODE_IS_STABLE),false)
$(Q) printf '\t\t<NoWarn>$$(NoWarn);XCODE_$(subst .,_,$(XCODE_VERSION))_PREVIEW</NoWarn>\n' >> $@.tmp
else
$(error "The variable XCODE_IS_STABLE is not set!")
endif
$(Q) printf "\t\t<TRACKING_DOTNET_RUNTIME_SEPARATELY>$(TRACKING_DOTNET_RUNTIME_SEPARATELY)</TRACKING_DOTNET_RUNTIME_SEPARATELY>\n" >> $@.tmp
$(Q) printf "\t</PropertyGroup>\n" >> $@.tmp
$(Q) printf "</Project>\n" >> $@.tmp
$(Q) mv $@.tmp $@
DOTNET_DESTDIR ?= $(TOP)/_build
DOTNET_NUPKG_DIR ?= $(DOTNET_DESTDIR)/nupkgs
DOTNET_PKG_DIR ?= $(DOTNET_DESTDIR)/pkgs
# Configuration for .NET 6.
# We're using preview versions, and there will probably be many of them, so install locally (into builds/downloads) if there's no system version to
# avoid consuming a lot of disk space (since they're never automatically deleted). The system-dependencies.sh script will install locally as long
# as there's a TARBALL url.
# If you build dotnet/runtime locally, "*-dev" is the version the built artifacts will use (and which we must reference)
CUSTOM_DOTNET_VERSION=6.0.0-dev
ifdef CUSTOM_DOTNET
DOTNET_BCL_VERSION=$(CUSTOM_DOTNET_VERSION)
export CUSTOM_DOTNET_VERSION
else
DOTNET_BCL_VERSION=$(BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION)
endif
DOTNET_VERSION_BAND=$(firstword $(subst -, ,$(DOTNET_VERSION)))
DOTNET_VERSION_PRERELEASE_COMPONENT=$(subst $(DOTNET_VERSION_BAND),,$(DOTNET_VERSION))
DOTNET_INSTALL_NAME=dotnet-sdk-$(DOTNET_VERSION)
DOTNET_DIR=$(abspath $(TOP)/builds/downloads/$(DOTNET_INSTALL_NAME))
# DOTNET_ROOT is no longer considered to find dotnet as seen here dotnet/roslyn@f454d69
# but it seems that some tools like csc still needs it so let's export it.
export DOTNET_ROOT=$(DOTNET_DIR)
# dotnet now is being looked up in the PATH
export PATH := $(DOTNET_DIR):$(PATH)
DOTNET=$(DOTNET_DIR)/dotnet
DOTNET_BCL_DIR:=$(abspath $(TOP)/packages/microsoft.netcore.app.ref/$(DOTNET_BCL_VERSION)/ref/$(DOTNET_TFM))
ifneq ($(DOTNET_BCL_DIR),$(shell ls -1d $(DOTNET_BCL_DIR) 2>/dev/null))
DOTNET_BCL_DIR:=$(abspath $(TOP)/packages/microsoft.netcore.app.ref/$(DOTNET_BCL_VERSION)/ref/net8.0)
endif
# The sdk version band has the last two digits set to 0: https://github.com/dotnet/sdk/blob/22c4860dcb2cf6b123dd641cc4a87a50380759d5/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs#L52-L53
DOTNET_MANIFEST_VERSION_BAND=$(shell echo $(DOTNET_VERSION_BAND) | sed 's/..$$/00/')
ifeq ($(DOTNET_VERSION_PRERELEASE_COMPONENT),)
DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT=$(DOTNET_MANIFEST_VERSION_BAND)
else ifeq ($(word 1,$(subst ., ,$(DOTNET_VERSION_PRERELEASE_COMPONENT))),-rtm)
DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT=$(DOTNET_MANIFEST_VERSION_BAND)
else ifeq ($(word 1,$(subst ., ,$(DOTNET_VERSION_PRERELEASE_COMPONENT))),-servicing)
DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT=$(DOTNET_MANIFEST_VERSION_BAND)
else
DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT=$(DOTNET_MANIFEST_VERSION_BAND)$(word 1,$(subst ., ,$(DOTNET_VERSION_PRERELEASE_COMPONENT))).$(word 2,$(subst ., ,$(DOTNET_VERSION_PRERELEASE_COMPONENT)))
endif
# These are the manifest version band used for Mono and Emscripten.
# It will typically be $(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT), unless the corresponding teams decided to hardcode something else.
MONO_TOOLCHAIN_MANIFEST_VERSION_BAND=$(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT)
EMSCRIPTEN_MANIFEST_VERSION_BAND=$(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT)
# This is the manifest version band we use for our .Manifest-$(VERSION_BAND) packages.
# It should typically be $(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT), unless we decide to hardcode it to something else
MACIOS_MANIFEST_VERSION_BAND=$(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT)
# The location of csc changes depending on whether we're using a preview or a stable/service release :/
DOTNET_CSC_PATH_PREVIEW=$(DOTNET_DIR)/sdk/$(DOTNET_VERSION)/Roslyn/bincore/csc.dll
DOTNET_CSC_PATH_STABLE=$(DOTNET_DIR)/sdk/$(DOTNET_VERSION_BAND)/Roslyn/bincore/csc.dll
# Attempt to detect where csc is based. This may fail in the future: feel free to fix/hardcode whatever's necessary to find csc.dll.
ifneq ("$(wildcard $(DOTNET_CSC_PATH_STABLE))","")
DOTNET_CSC=$(DOTNET) exec $(DOTNET_CSC_PATH_STABLE)
else
DOTNET_CSC=$(DOTNET) exec $(DOTNET_CSC_PATH_PREVIEW)
endif
# How are our assemblies named?
DOTNET_IOS_ASSEMBLY_NAME=Microsoft.iOS
DOTNET_TVOS_ASSEMBLY_NAME=Microsoft.tvOS
DOTNET_MACCATALYST_ASSEMBLY_NAME=Microsoft.MacCatalyst
DOTNET_MACOS_ASSEMBLY_NAME=Microsoft.macOS
DOTNET_PLATFORMS=
ifdef INCLUDE_IOS
DOTNET_PLATFORMS+=iOS
DOTNET_MONOVM_PLATFORMS+=iOS
DOTNET_IOS_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=iOS
XCFRAMEWORK_PLATFORMS+=iossimulator
XCFRAMEWORK_iossimulator_RUNTIME_IDENTIFIERS=iossimulator-x64 iossimulator-arm64
# 64-bit architectures
ifdef INCLUDE_DEVICE
DOTNET_IOS_RUNTIME_IDENTIFIERS_64=ios-arm64
XCFRAMEWORK_PLATFORMS+=ios
XCFRAMEWORK_ios_RUNTIME_IDENTIFIERS=ios-arm64
endif # INCLUDE_DEVICE
DOTNET_IOS_RUNTIME_IDENTIFIERS_64+=iossimulator-x64 iossimulator-arm64
# All of them
DOTNET_IOS_RUNTIME_IDENTIFIERS=$(DOTNET_IOS_RUNTIME_IDENTIFIERS_32) $(DOTNET_IOS_RUNTIME_IDENTIFIERS_64)
endif # INCLUDE_IOS
ifdef INCLUDE_TVOS
DOTNET_PLATFORMS+=tvOS
DOTNET_MONOVM_PLATFORMS+=tvOS
DOTNET_TVOS_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=tvOS
XCFRAMEWORK_PLATFORMS+=tvossimulator
XCFRAMEWORK_tvossimulator_RUNTIME_IDENTIFIERS=tvossimulator-x64 tvossimulator-arm64
ifdef INCLUDE_DEVICE
DOTNET_TVOS_RUNTIME_IDENTIFIERS=tvos-arm64 tvossimulator-x64 tvossimulator-arm64
XCFRAMEWORK_PLATFORMS+=tvos
XCFRAMEWORK_tvos_RUNTIME_IDENTIFIERS=tvos-arm64
else
DOTNET_TVOS_RUNTIME_IDENTIFIERS=tvossimulator-x64 tvossimulator-arm64
endif
DOTNET_TVOS_RUNTIME_IDENTIFIERS_64+=$(DOTNET_TVOS_RUNTIME_IDENTIFIERS)
endif
ifdef INCLUDE_MACCATALYST
DOTNET_PLATFORMS+=MacCatalyst
DOTNET_MONOVM_PLATFORMS+=MacCatalyst
DOTNET_MACCATALYST_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=MacCatalyst
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS=maccatalyst-x64 maccatalyst-arm64
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS_64+=$(DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS)
XCFRAMEWORK_PLATFORMS+=maccatalyst
XCFRAMEWORK_DESKTOP_PLATFORMS+=maccatalyst
XCFRAMEWORK_maccatalyst_RUNTIME_IDENTIFIERS=$(DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS)
endif
ifdef INCLUDE_MAC
DOTNET_PLATFORMS+=macOS
DOTNET_CORECLR_PLATFORMS+=macOS
DOTNET_MACOS_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=macOS
DOTNET_MACOS_RUNTIME_IDENTIFIERS=osx-x64 osx-arm64
DOTNET_MACOS_RUNTIME_IDENTIFIERS_64=$(DOTNET_MACOS_RUNTIME_IDENTIFIERS)
XCFRAMEWORK_PLATFORMS+=macos
XCFRAMEWORK_DESKTOP_PLATFORMS+=macos
XCFRAMEWORK_macos_RUNTIME_IDENTIFIERS=$(DOTNET_MACOS_RUNTIME_IDENTIFIERS)
endif
ifdef INCLUDE_IOS
DOTNET_WINDOWS_PLATFORMS = iOS
endif
# Create variables prefixed with the correctly cased platform name from the upper-cased platform name. This simplifies code in a few areas (whenever we foreach over DOTNET_PLATFORMS).
$(foreach platform,$(DOTNET_PLATFORMS),$(eval DOTNET_$(platform)_RUNTIME_IDENTIFIERS:=$(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS)))
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(platform)_NUGET_OS_VERSION:=$($(shell echo $(platform) | tr a-z A-Z)_NUGET_OS_VERSION)))
# Create a variable with all the runtime identifiers
DOTNET_RUNTIME_IDENTIFIERS=$(foreach platform,$(DOTNET_PLATFORMS),$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS))
# Create a variable with all the MonoVM runtime identifiers
DOTNET_MONOVM_RUNTIME_IDENTIFIERS=$(foreach platform,$(DOTNET_MONOVM_PLATFORMS),$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS))
# Create a variable with all the CoreCLR runtime identifiers
DOTNET_CORECLR_RUNTIME_IDENTIFIERS=$(foreach platform,$(DOTNET_CORECLR_PLATFORMS),$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS))
# Create a variable with the platform in uppercase
DOTNET_PLATFORMS_UPPERCASE:=$(shell echo $(DOTNET_PLATFORMS) | tr a-z A-Z)
# All desktop platforms we're building for
DOTNET_DESKTOP_PLATFORMS:=$(filter macOS MacCatalyst,$(DOTNET_PLATFORMS))
# a few lookup tables, because the data we have is not always in the format we need it
# RUNTIMEIDENTIFIER -> architecture
DOTNET_iossimulator-x64_ARCHITECTURES=x86_64
DOTNET_iossimulator-arm64_ARCHITECTURES=arm64
DOTNET_iossimulator-x86_ARCHITECTURES=x86
DOTNET_ios-arm64_ARCHITECTURES=arm64
DOTNET_tvossimulator-x64_ARCHITECTURES=x86_64
DOTNET_tvossimulator-arm64_ARCHITECTURES=arm64
DOTNET_tvos-arm64_ARCHITECTURES=arm64
DOTNET_osx-x64_ARCHITECTURES=x86_64
DOTNET_osx-arm64_ARCHITECTURES=arm64
DOTNET_maccatalyst-x64_ARCHITECTURES=x86_64
DOTNET_maccatalyst-arm64_ARCHITECTURES=arm64
DOTNET_iossimulator-x64_SDK_PLATFORM=iphonesimulator
DOTNET_iossimulator-arm64_SDK_PLATFORM=iphonesimulator
DOTNET_iossimulator-x86_SDK_PLATFORM=iphonesimulator
DOTNET_ios-arm_SDK_PLATFORM=iphoneos
DOTNET_ios-arm64_SDK_PLATFORM=iphoneos
DOTNET_tvossimulator-x64_SDK_PLATFORM=tvsimulator
DOTNET_tvossimulator-arm64_SDK_PLATFORM=tvsimulator
DOTNET_tvos-arm64_SDK_PLATFORM=tvos
DOTNET_osx-x64_SDK_PLATFORM=mac
DOTNET_osx-arm64_SDK_PLATFORM=mac
DOTNET_maccatalyst-x64_SDK_PLATFORM=maccatalyst
DOTNET_maccatalyst-arm64_SDK_PLATFORM=maccatalyst
DOTNET_iOS_SDK_PLATFORMS=iphonesimulator iphoneos
DOTNET_tvOS_SDK_PLATFORMS=tvsimulator tvos
DOTNET_macOS_SDK_PLATFORMS=mac
DOTNET_MacCatalyst_SDK_PLATFORMS=maccatalyst
# XCFRAMEWORK_PLATFORM -> PLATFORM
DOTNET_iossimulator_PLATFORM=ios
DOTNET_ios_PLATFORM=ios
DOTNET_tvossimulator_PLATFORM=tvos
DOTNET_tvos_PLATFORM=tvos
DOTNET_maccatalyst_PLATFORM=maccatalyst
DOTNET_macos_PLATFORM=macos
# XCFRAMEWORK -> clang argument for min OS version
CLANG_iossimulator-x64_VERSION_MIN=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION)
CLANG_iossimulator-arm64_VERSION_MIN=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION)
CLANG_ios-arm64_VERSION_MIN=-miphoneos-version-min=$(MIN_IOS_SDK_VERSION)
CLANG_tvossimulator-x64_VERSION_MIN=-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION)
CLANG_tvossimulator-arm64_VERSION_MIN=-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION)
CLANG_tvos-arm64_VERSION_MIN=-mtvos-version-min=$(MIN_TVOS_SDK_VERSION)
CLANG_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -arch x86_64
CLANG_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -arch arm64
CLANG_osx-x64_VERSION_MIN=-mmacosx-version-min=$(MIN_MACOS_SDK_VERSION)
CLANG_osx-arm64_VERSION_MIN=-mmacosx-version-min=$(MIN_MACOS_SDK_VERSION)
# RUNTIMEIDENTIFIER -> swiftc argument(s) for min OS version
SWIFTC_iossimulator-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_IOS_SDK_VERSION)-simulator
SWIFTC_iossimulator-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_IOS_SDK_VERSION)-simulator
SWIFTC_ios-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_IOS_SDK_VERSION)
SWIFTC_tvossimulator-x64_VERSION_MIN=-target x86_64-apple-tvos$(MIN_TVOS_SDK_VERSION)-simulator
SWIFTC_tvossimulator-arm64_VERSION_MIN=-target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION)-simulator
SWIFTC_tvos-arm64_VERSION_MIN=-target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION)
SWIFTC_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi
SWIFTC_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi
SWIFTC_osx-x64_VERSION_MIN=-target x86_64-apple-macos$(MIN_MACOS_SDK_VERSION)
SWIFTC_osx-arm64_VERSION_MIN=-target arm64-apple-macos$(MIN_MACOS_SDK_VERSION)
# Misc other computed variables
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(shell echo $(platform) | tr a-z A-Z)_NUGET_SDK_NAME=Microsoft.$(platform).Sdk.$(DOTNET_TFM)_$($(platform)_NUGET_OS_VERSION)))
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(shell echo $(platform) | tr a-z A-Z)_NUGET_REF_NAME=Microsoft.$(platform).Ref.$(DOTNET_TFM)_$($(platform)_NUGET_OS_VERSION)))
$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS),$(eval $(rid)_NUGET_RUNTIME_NAME=Microsoft.$(platform).Runtime.$(rid).$(DOTNET_TFM)_$($(platform)_NUGET_OS_VERSION))))
$(foreach platform,$(DOTNET_WINDOWS_PLATFORMS),$(eval $(shell echo $(platform) | tr a-z A-Z)_NUGET_WINDOWS_SDK_NAME=Microsoft.$(platform).Windows.Sdk.$(DOTNET_TFM)_$($(platform)_NUGET_OS_VERSION)))
# Create variables prefixed with the correctly cased platform name from the upper-cased platform name. This simplifies code in a few areas (whenever we foreach over DOTNET_PLATFORMS).
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(platform)_NUGET_SDK_NAME:=$($(shell echo $(platform) | tr a-z A-Z)_NUGET_SDK_NAME)))
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(platform)_NUGET_REF_NAME:=$($(shell echo $(platform) | tr a-z A-Z)_NUGET_REF_NAME)))
$(foreach platform,$(DOTNET_WINDOWS_PLATFORMS),$(eval $(platform)_NUGET_WINDOWS_SDK_NAME:=$($(shell echo $(platform) | tr a-z A-Z)_NUGET_WINDOWS_SDK_NAME)))
# A local feed to place test nugets.
NUGET_TEST_FEED=$(abspath $(TOP)/tests/.nuget/packages)
.SUFFIXES:
MAKEFLAGS += --no-builtin-rules