Skip to content

Commit

Permalink
[build/src] Remove numerous legacy build variables. (#21922)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Jan 9, 2025
1 parent 605b1b7 commit 3d038b7
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 188 deletions.
66 changes: 20 additions & 46 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,6 @@ 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)))
Expand Down Expand Up @@ -325,18 +316,6 @@ SYSTEM_MSBUILD=unset MSBuildExtensionsPath && $(MONO_PREFIX)/bin/msbuild /p:Feat

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)))
Expand All @@ -345,11 +324,6 @@ 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
Expand Down Expand Up @@ -600,28 +574,28 @@ 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)
CLANG_iossimulator-x64_VERSION_MIN=-mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION)
CLANG_iossimulator-arm64_VERSION_MIN=-mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION)
CLANG_ios-arm64_VERSION_MIN=-miphoneos-version-min=$(DOTNET_MIN_IOS_SDK_VERSION)
CLANG_tvossimulator-x64_VERSION_MIN=-mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION)
CLANG_tvossimulator-arm64_VERSION_MIN=-mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION)
CLANG_tvos-arm64_VERSION_MIN=-mtvos-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION)
CLANG_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi -arch x86_64
CLANG_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi -arch arm64
CLANG_osx-x64_VERSION_MIN=-mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION)
CLANG_osx-arm64_VERSION_MIN=-mmacosx-version-min=$(DOTNET_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)
SWIFTC_iossimulator-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)-simulator
SWIFTC_iossimulator-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)-simulator
SWIFTC_ios-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)
SWIFTC_tvossimulator-x64_VERSION_MIN=-target x86_64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)-simulator
SWIFTC_tvossimulator-arm64_VERSION_MIN=-target arm64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)-simulator
SWIFTC_tvos-arm64_VERSION_MIN=-target arm64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)
SWIFTC_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi
SWIFTC_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi
SWIFTC_osx-x64_VERSION_MIN=-target x86_64-apple-macos$(DOTNET_MIN_MACOS_SDK_VERSION)
SWIFTC_osx-arm64_VERSION_MIN=-target arm64-apple-macos$(DOTNET_MIN_MACOS_SDK_VERSION)


# Misc other computed variables
Expand Down
46 changes: 1 addition & 45 deletions Make.versions
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#
# A release branch requires updating the following six variables at the bottom of this file:
#
# IOS_PACKAGE_VERSION (major/minor/revision #)
# MAC_PACKAGE_VERSION (major/minor/revision #)
# A release branch requires updating the following four variables further down in this file:
#
# IOS_NUGET_VERSION (major/minor/patch #)
# TVOS_NUGET_VERSION (major/minor/patch #)
Expand All @@ -12,45 +9,6 @@
# Update version numbers on main as well, to the next version
#

#
# ** Version numbers **
#
# Versions are defined as: Major.Minor.Revison.Build
#
# Major/minor (first/second numbers - max 2 digits each):
# - Bump for major/minor releases.
#
# Revision (third number - max 2 digits):
# - Reset to 0 after a major or minor bump (do not use 99 for Xcode preview
# branches (use 0 instead), because otherwise we can't bump it further if
# needed).
# - Bump for service releases and previews.
# - Bump if commit distance becomes > 999.
# - Can also be bumped for other reasons (in particular there's no correlation
# between Preview/Service Release #X and Revision #Y).
# - Bumping revision to a high enough number to make it clear that there's
# no correlation is a valid reason to bump.
# - The revision must be bumped at the same time for both iOS and Mac
# (otherwise the commit distance will differ).
# - Also bump if the [IOS|MAC]_PACKAGE_VERSION lines change for any other
# reason (otherwise we end up with repeating version numbers, since the
# commit distance would restart at 0, while the other numbers wouldn't
# change).
# - Any other problem can also usually be solved by bumping the revision.
# - Do not refactor the revision to a separate variable, because the reason
# bumping the revision is a general solution for many problems is that it
# also resets the commit distance (which wouldn't happen if the revision was
# refactored to a separate variable).
#
# Build (fourth number - max 3 digits):
# - Automatically calculated as the number of commits since the last time any
# of the other three numbers changed (technically since the corresponding
# line changed in git).
#

IOS_PACKAGE_VERSION=17.99.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
#
Expand All @@ -63,8 +21,6 @@ MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE)
# IMPORTANT: There must be *no* managed API differences unless the two first
# numbers (major.minor) changes.

# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)

IOS_NUGET_OS_VERSION=18.2
TVOS_NUGET_OS_VERSION=18.2
MACOS_NUGET_OS_VERSION=15.2
Expand Down
15 changes: 0 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ world: check-system

.PHONY: check-system
check-system:
ifdef INCLUDE_MAC
ifdef INCLUDE_IOS
@if [[ "x$(IOS_COMMIT_DISTANCE)" != "x$(MAC_COMMIT_DISTANCE)" ]]; then \
echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are different.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
exit 1; \
elif (( $(IOS_COMMIT_DISTANCE) > 999 || $(MAC_COMMIT_DISTANCE) > 999 )); then \
echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and/or Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are > 999.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
exit 1; \
fi
endif
endif
@./system-dependencies.sh
$(Q) $(MAKE) show-versions

Expand Down
3 changes: 0 additions & 3 deletions create-make-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ LANG=C
export LANG

# Compute commit distances
printf "IOS_COMMIT_DISTANCE:=$(git log $(git blame -- ./Make.versions HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' )..HEAD --oneline | wc -l | sed 's/ //g')\n" >> "$OUTPUT_FILE"
printf "MAC_COMMIT_DISTANCE:=$(git log $(git blame -- ./Make.versions HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' )..HEAD --oneline | wc -l | sed 's/ //g')\n" >> "$OUTPUT_FILE"

for platform in $ALL_DOTNET_PLATFORMS; do
PLATFORM=$(echo "$platform" | tr '[:lower:]' '[:upper:]')
COMMIT=$(git blame -- ./Make.versions HEAD | grep "${PLATFORM}_NUGET_OS_VERSION=" | sed 's/ .*//')
Expand Down
4 changes: 1 addition & 3 deletions msbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ clean-local::
git clean -xfdq
cd $(XAMARIN_MACDEV_PATH) && git clean -xfdq

# We use the legacy Xamarin versions for the .NET assemblies as well.
Versions.g.cs: Makefile $(TOP)/Make.config.inc
$(Q) printf "public static class VersionConstants {\\n" > $@.tmp
$(Q) printf "\\tpublic const string XamarinMacVersion = \"$(MAC_PACKAGE_VERSION)\";\\n" >> $@.tmp
$(Q) printf "\\tpublic const string XamarinIOSVersion = \"$(IOS_PACKAGE_VERSION)\";\\n" >> $@.tmp
$(Q) printf "\\tpublic const string NuGetVersion = \"$($(shell echo $(firstword $(DOTNET_PLATFORMS)) | tr 'a-z' 'A-Z')_NUGET_VERSION)\";\\n" >> $@.tmp
$(Q) echo $(foreach platform,$(ALL_DOTNET_PLATFORMS),"\\tpublic const string Microsoft_$(platform)_Version = \"$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_FULL)\";\\n") >> $@.tmp
$(Q) echo $(foreach platform,$(ALL_DOTNET_PLATFORMS),"\\tpublic const string Microsoft_$(platform)_Standard_Version = \"$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_MAJOR).$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_MINOR).0.$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_PATCH)\";\\n") >> $@.tmp
$(Q) printf "\\tpublic const string NuGetPrereleaseIdentifier = \"$(NUGET_PRERELEASE_IDENTIFIER)\";\\n" >> $@.tmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Runtime.CompilerServices;

[assembly: AssemblyCompanyAttribute ("Microsoft Corp.")]
[assembly: AssemblyFileVersionAttribute (VersionConstants.XamarinIOSVersion)]
[assembly: AssemblyInformationalVersionAttribute (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)]
[assembly: AssemblyFileVersionAttribute (VersionConstants.NuGetVersion + ".0")]
[assembly: AssemblyInformationalVersionAttribute (VersionConstants.NuGetVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)]
[assembly: AssemblyProductAttribute ("Xamarin.Localization.MSBuild")]
[assembly: AssemblyTitleAttribute ("Xamarin.Localization.MSBuild")]
[assembly: AssemblyVersionAttribute (VersionConstants.XamarinIOSVersion)]
[assembly: AssemblyVersionAttribute (VersionConstants.NuGetVersion + ".0")]
8 changes: 3 additions & 5 deletions msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

// We use the iOS version on all platforms (this way we only have to compile the tasks once)

[assembly: AssemblyVersion (VersionConstants.XamarinIOSVersion)]
[assembly: AssemblyFileVersion (VersionConstants.XamarinIOSVersion)]
[assembly: AssemblyInformationalVersion (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)]
[assembly: AssemblyVersion (VersionConstants.NuGetVersion + ".0")]
[assembly: AssemblyFileVersion (VersionConstants.NuGetVersion + ".0")]
[assembly: AssemblyInformationalVersion (VersionConstants.NuGetVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
6 changes: 3 additions & 3 deletions msbuild/Xamarin.iOS.Tasks.Windows/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Runtime.CompilerServices;

[assembly: AssemblyCompanyAttribute ("Microsoft Corp.")]
[assembly: AssemblyFileVersionAttribute (VersionConstants.XamarinIOSVersion)]
[assembly: AssemblyInformationalVersionAttribute (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)]
[assembly: AssemblyFileVersionAttribute (VersionConstants.NuGetVersion + ".0")]
[assembly: AssemblyInformationalVersionAttribute (VersionConstants.NuGetVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)]
[assembly: AssemblyProductAttribute ("Xamarin.iOS.Tasks.Windows")]
[assembly: AssemblyTitleAttribute ("Xamarin.iOS.Tasks.Windows")]
[assembly: AssemblyVersionAttribute (VersionConstants.XamarinIOSVersion)]
[assembly: AssemblyVersionAttribute (VersionConstants.NuGetVersion + ".0")]
2 changes: 0 additions & 2 deletions release/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ mac-work
mac-work-uninstall
_ios-install
_mac-install
Version
Version.rev
xma-tmp-package
xma-work
*.zip
10 changes: 1 addition & 9 deletions release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ endif
cd msbuild && zip -9 -r $(abspath $@) .
rm -rf msbuild

bundle.zip: Version Version.rev
bundle.zip:
rm -f $@
$(foreach platform,$(DOTNET_PLATFORMS),export $(platform)_NUGET_REF_NAME=$($(platform)_NUGET_REF_NAME);) \
for platform in $(DOTNET_PLATFORMS); do \
Expand All @@ -41,11 +41,3 @@ bundle.zip: Version Version.rev
zip -9 -r $(CURDIR)/bundle.zip ./Microsoft.$$platform.Ref/ref/; \
rm -rf tmpdir; \
done
zip -9 $@ Version Version.rev

Version:
$(Q) echo "$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)" > $@

Version.rev:
$(Q) echo "$(IOS_PACKAGE_VERSION_BUILD)" > $@

15 changes: 4 additions & 11 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,12 @@ IOS_CORE_DEFINES=-define:COREBUILD $(IOS_DEFINES)
$(IOS_DOTNET_BUILD_DIR)/Constants.cs: Constants.iOS.cs.in Makefile $(TOP)/Make.config.inc | $(IOS_DOTNET_BUILD_DIR)
$(call Q_PROF_GEN,ios) sed \
-e "s/@VERSION@/$(IOS_NUGET_VERSION_MAJOR).$(IOS_NUGET_VERSION_MINOR).$(IOS_NUGET_VERSION_PATCH)/g" \
-e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e 's/@REVISION@/$(IOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e "s/@IOS_SDK_VERSION@/$(IOS_SDK_VERSION)/g" \
$< > $@

$(IOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in | $(IOS_DOTNET_BUILD_DIR)
$(call Q_PROF_GEN,ios) sed \
-e 's|@PRODUCT_NAME@|$(IOS_PRODUCT)|g' \
-e 's|@PACKAGE_HEAD_REV@|$(PACKAGE_HEAD_REV)|g' \
-e 's|@PACKAGE_HEAD_BRANCH@|$(CURRENT_BRANCH_SED_ESCAPED)|g' \
-e 's|@NUGET_VERSION_NO_METADATA@|$(IOS_NUGET_VERSION_NO_METADATA)|g' \
Expand Down Expand Up @@ -208,14 +207,13 @@ MACOS_DOTNET_SOURCES += \
$(MACOS_DOTNET_BUILD_DIR)/Constants.cs: Constants.mac.cs.in Makefile $(TOP)/Make.config.inc | $(MACOS_DOTNET_BUILD_DIR)
$(Q) sed \
-e "s/@VERSION@/$(MACOS_NUGET_VERSION_MAJOR).$(MACOS_NUGET_VERSION_MINOR).$(MACOS_NUGET_VERSION_PATCH)/g" \
-e 's/@REVISION@/$(MAC_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e 's/@REVISION@/$(MACOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e "s/@MACOS_SDK_VERSION@/$(MACOS_SDK_VERSION)/g" \
-e "s/@MIN_XM_MONO_VERSION@/$(MIN_XM_MONO_VERSION)/g" \
$< > $@

$(MACOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in | $(MACOS_DOTNET_BUILD_DIR)
$(call Q_PROF_GEN,mac) sed \
-e 's|@PRODUCT_NAME@|$(MAC_PRODUCT)|g' \
-e 's|@PACKAGE_HEAD_REV@|$(PACKAGE_HEAD_REV)|g' \
-e 's|@NUGET_VERSION_NO_METADATA@|$(MACOS_NUGET_VERSION_NO_METADATA)|g' \
-e 's|@NUGET_VERSION_MAJOR@|$(MACOS_NUGET_VERSION_MAJOR)|g' \
Expand Down Expand Up @@ -265,7 +263,7 @@ TVOS_DOTNET_SOURCES += \
$(TVOS_DOTNET_BUILD_DIR)/Constants.cs: $(TOP)/src/Constants.tvos.cs.in Makefile $(TOP)/Make.config.inc | $(TVOS_DOTNET_BUILD_DIR)
$(call Q_PROF_GEN,tvos) sed \
-e "s/@VERSION@/$(TVOS_NUGET_VERSION_MAJOR).$(TVOS_NUGET_VERSION_MINOR).$(TVOS_NUGET_VERSION_PATCH)/g" \
-e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e 's/@REVISION@/$(TVOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e "s/@TVOS_SDK_VERSION@/$(TVOS_SDK_VERSION)/g" \
$< > $@

Expand Down Expand Up @@ -317,7 +315,7 @@ MACCATALYST_DOTNET_SOURCES += \
$(MACCATALYST_DOTNET_BUILD_DIR)/Constants.cs: $(TOP)/src/Constants.maccatalyst.cs.in Makefile $(TOP)/Make.config.inc | $(MACCATALYST_DOTNET_BUILD_DIR)
$(call Q_PROF_GEN,maccatalyst) sed \
-e "s/@VERSION@/$(MACCATALYST_NUGET_VERSION_MAJOR).$(MACCATALYST_NUGET_VERSION_MINOR).$(MACCATALYST_NUGET_VERSION_PATCH)/g" \
-e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e 's/@REVISION@/$(MACCATALYST_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \
-e "s/@MACCATALYST_SDK_VERSION@/$(MACCATALYST_SDK_VERSION)/g" \
$< > $@

Expand Down Expand Up @@ -580,11 +578,6 @@ MinimumVersions.cs: MinimumVersions.cs.in Makefile $(TOP)/Make.config
-e 's/@DOTNET_MIN_TVOS_SDK_VERSION@/$(DOTNET_MIN_TVOS_SDK_VERSION)/' \
-e 's/@DOTNET_MIN_MACOS_SDK_VERSION@/$(DOTNET_MIN_MACOS_SDK_VERSION)/' \
-e 's/@DOTNET_MIN_MACCATALYST_SDK_VERSION@/$(DOTNET_MIN_MACCATALYST_SDK_VERSION)/g' \
\
-e 's/@MIN_IOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_IOS_SDK_VERSION))/g' \
-e 's/@MIN_MACOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_MACOS_SDK_VERSION))/g' \
-e 's/@MIN_TVOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_TVOS_SDK_VERSION))/g' \
-e 's/@MIN_MACCATALYST_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_MACCATALYST_SDK_VERSION))/g' \
$< > $@

# Using .SECONDARY can cause make to go into an infinite loop.
Expand Down
Loading

0 comments on commit 3d038b7

Please sign in to comment.