diff --git a/src/MacVim/MacVim.xcodeproj/project.pbxproj b/src/MacVim/MacVim.xcodeproj/project.pbxproj index e35f545069..c12a024632 100644 --- a/src/MacVim/MacVim.xcodeproj/project.pbxproj +++ b/src/MacVim/MacVim.xcodeproj/project.pbxproj @@ -890,6 +890,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 0710; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */; diff --git a/src/auto/configure b/src/auto/configure index c060dee798..3c7866d5db 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -4792,7 +4792,21 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else if test -z "$MACOSX_DEPLOYMENT_TARGET"; then - macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'` + # Deployment target not specified. We use the current OS' version. We + # only want to extract the main OS version but not the minor version for + # multiple reasons: it's more predictable if this is built from a CI to + # be deployed out (e.g. Homebrew), and sometimes deployment target + # that is too new will cause Xcode to complain (e.g. macOS is 13.2 while + # Xcode may only support up to 13.1) + macosx_major_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\)\.[0-9]*.*/\1/'` + macosx_minor_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^[0-9]*\.\([0-9]*\).*/\1/'` + if test "$macosx_major_version" = "10"; then + # Older versions look like 10.X.Y form where X is the main version. + macosx_deployment_target="$macosx_major_version.$macosx_minor_version" + else + # Since 11.0, We have X.Y.Z, where X is the main version. + macosx_deployment_target="$macosx_major_version.0" + fi XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target" else XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET" diff --git a/src/configure.ac b/src/configure.ac index 1d7cbe615e..c7172f8da6 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -298,7 +298,21 @@ if test "$vim_cv_uname_output" = Darwin; then LDFLAGS="$save_ldflags" ]) else if test -z "$MACOSX_DEPLOYMENT_TARGET"; then - macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\.[[0-9]]*\).*/\1/'` + # Deployment target not specified. We use the current OS' version. We + # only want to extract the main OS version but not the minor version for + # multiple reasons: it's more predictable if this is built from a CI to + # be deployed out (e.g. Homebrew), and sometimes deployment target + # that is too new will cause Xcode to complain (e.g. macOS is 13.2 while + # Xcode may only support up to 13.1) + macosx_major_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\)\.[[0-9]]*.*/\1/'` + macosx_minor_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^[[0-9]]*\.\([[0-9]]*\).*/\1/'` + if test "$macosx_major_version" = "10"; then + # Older versions look like 10.X.Y form where X is the main version. + macosx_deployment_target="$macosx_major_version.$macosx_minor_version" + else + # Since 11.0, We have X.Y.Z, where X is the main version. + macosx_deployment_target="$macosx_major_version.0" + fi XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target" else XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"