Skip to content

Commit 76cc4e2

Browse files
authored
Merge pull request #1441 from ychin/fix-build-clean-sdk-location
Fix misc build issues: cleaning build folder and --with-macsdk
2 parents e9167c2 + 0621cdd commit 76cc4e2

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ src/MacVim/qlstephen/QuickLookStephen.xcodeproj/*.pbxuser
123123
src/MacVim/qlstephen/QuickLookStephen.xcodeproj/xcuserdata
124124
src/MacVim/qlstephen/build
125125
src/MacVim/build
126+
src/MacVim/auto
126127
src/MacVim/DerivedData
127128
src/TAGS
128129
src/Vim

src/MacVim/MacVim.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@
10751075
);
10761076
runOnlyForDeploymentPostprocessing = 0;
10771077
shellPath = /bin/sh;
1078-
shellScript = "# Generate a list of folders that will affect the runtime folder output, so\n# that incremental build can use it to only install them if the runtime folders\n# have changed. The main reason we have to manually generate it is because\n# Xcode's \"Input File Lists\" doesn't support recursion/wildcards.\n\nfind -s ../../runtime -type d > \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist\n\nif cmp -s \"${OBJROOT}\"/runtime_folder_list.xcfilelist \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist; then\n rm \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist\nelse\n mv -f \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist \"${OBJROOT}\"/runtime_folder_list.xcfilelist\nfi\n";
1078+
shellScript = "# Generate a list of folders that will affect the runtime folder output, so\n# that incremental build can use it to only install them if the runtime folders\n# have changed. The main reason we have to manually generate it is because\n# Xcode's \"Input File Lists\" doesn't support recursion/wildcards.\n\nfind -s ../../runtime -type d > \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist\n\nif cmp -s \"${SRCROOT}\"/auto/runtime_folder_list.xcfilelist \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist; then\n rm \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist\nelse\n mv -f \"${OBJROOT}\"/runtime_folder_list_new.xcfilelist \"${SRCROOT}\"/auto/runtime_folder_list.xcfilelist\nfi\n";
10791079
showEnvVarsInLog = 0;
10801080
};
10811081
9099B3CA2914B272005C9F32 /* Clean up build */ = {
@@ -1104,7 +1104,7 @@
11041104
files = (
11051105
);
11061106
inputFileListPaths = (
1107-
$OBJROOT/runtime_folder_list.xcfilelist,
1107+
$SRCROOT/auto/runtime_folder_list.xcfilelist,
11081108
);
11091109
inputPaths = (
11101110
"$(SRCROOT)/../xxd/xxd",

src/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,7 +3642,7 @@ Makefile:
36423642
### MacVim GUI
36433643
.PHONY: macvim macvim-dmg macvim-dmg-legacy macvimclean macvim-signed macvim-dmg-release macvim-dmg-release-legacy macvim-install-runtime
36443644

3645-
RUNTIME_FOLDER_LIST = MacVim/build/runtime_folder_list.xcfilelist
3645+
RUNTIME_FOLDER_LIST = MacVim/auto/runtime_folder_list.xcfilelist
36463646

36473647
RELEASEDIR = MacVim/build/Release
36483648
DMGDIR = MacVim/build/dmg
@@ -3657,7 +3657,7 @@ $(RUNTIME_FOLDER_LIST):
36573657
# Generate a stub runtime folder list, used for incremental builds.
36583658
# Xcode's dependnecy management requires this file to exist at start
36593659
# of build, even though this file is only generated during build time.
3660-
mkdir -p MacVim/build
3660+
mkdir -p MacVim/auto
36613661
touch $(RUNTIME_FOLDER_LIST)
36623662

36633663
macvim: $(VIMTARGET) $(RUNTIME_FOLDER_LIST)
@@ -3689,7 +3689,7 @@ macvim-dmg:
36893689

36903690
macvimclean:
36913691
if test -d MacVim; then \
3692-
rm -rf MacVim/build MacVim/qlstephen/build xxd/xxd.dSYM; \
3692+
rm -rf MacVim/auto MacVim/build MacVim/qlstephen/build xxd/xxd.dSYM; \
36933693
fi
36943694

36953695
# Create a release DMG image that is signed and notaraized

src/auto/configure

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4960,13 +4960,18 @@ fi
49604960
printf %s "checking if SDK is supported... " >&6; }
49614961
save_cflags="$CFLAGS"
49624962
save_ldflags="$LDFLAGS"
4963-
sdkflags="$DEVELOPER_DIR/SDKs/MacOSX$MACSDK"
4963+
4964+
sdkflags="$DEVELOPER_DIR/SDKs/MacOSX$MACSDK"
49644965
if test "x$MACSDK" = "x10.4"; then
49654966
sdkflags="$sdkflags""u"
49664967
fi
4968+
if ! test -d "$sdkflags.sdk"; then
4969+
sdkflags="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$MACSDK"
4970+
fi
49674971
sdkflags="$sdkflags.sdk -mmacosx-version-min=$MACSDK"
4972+
49684973
CFLAGS="$CFLAGS -isysroot $sdkflags"
4969-
LDFLAGS="$LDFLAGS -Wl,-syslibroot,$sdkflags"
4974+
LDFLAGS="$LDFLAGS -isysroot $sdkflags"
49704975
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49714976
/* end confdefs.h. */
49724977

src/configure.ac

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,20 @@ if test "$vim_cv_uname_output" = Darwin; then
280280
AC_MSG_CHECKING(if SDK is supported)
281281
save_cflags="$CFLAGS"
282282
save_ldflags="$LDFLAGS"
283+
284+
dnl Old location of SDKs and also in Command-Line Tools
283285
sdkflags="$DEVELOPER_DIR/SDKs/MacOSX$MACSDK"
284286
if test "x$MACSDK" = "x10.4"; then
285287
sdkflags="$sdkflags""u"
286288
fi
289+
if ! test -d "$sdkflags.sdk"; then
290+
dnl Location of SDKs in Xcode
291+
sdkflags="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$MACSDK"
292+
fi
287293
sdkflags="$sdkflags.sdk -mmacosx-version-min=$MACSDK"
294+
288295
CFLAGS="$CFLAGS -isysroot $sdkflags"
289-
LDFLAGS="$LDFLAGS -Wl,-syslibroot,$sdkflags"
296+
LDFLAGS="$LDFLAGS -isysroot $sdkflags"
290297
AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])],
291298
[ AC_MSG_RESULT([yes])
292299
XCODEFLAGS="$XCODEFLAGS -sdk macosx$MACSDK MACOSX_DEPLOYMENT_TARGET=$MACSDK" ],

0 commit comments

Comments
 (0)