Skip to content

Commit 556a274

Browse files
committed
Install Vim runtime to the MacVim app bundle properly
Previously, MacVim's build process simply used an Xcode post-build script to copy the runtime folder to the target app bundle's Contents/Resources/vim/runtime folder and called it a day. However, that's actually not the correct procedure because the runtime folder contains misc files (e.g. Makefile/testdir for testing) and they should go through a install step using `make install` to properly deploy the proper files to the target folder. Fix this by changing the post-build script to call the relevant make targets instead of just blindly copying it over. We still copy the vim/view/etc and vimtutor binaries separately for now, because the mvim script is a custom script for MacVim, although that could change in future. One of the corollary of using the builtin installation scripts is that man pages (for CLI vim/gvim usage) are now properly generated. They are now stored under `MacVim.app/Contents/man`, and a user can set MANPATH to it if they so wish. Another corollary is that we now bundle xxd with MacVim like most Vim distributions. It was probably an oversight before, and now it's built and bundled in the `MacVim.app/Contents/bin` folder like the vim/view/mvim scripts. One annoying thing with Xcode is that in order for incremental builds to work properly we want it to only run this installation step if the runtime folder has changed (it takes a couple secs to finish) and Xcode's input file lists doesn't support recursive folder search. To fix this, add a build step to manually generate the list of all runtime folders called runtime_folder_list.xcfilelist which we pass to the build step. Fix #1417
1 parent ad04495 commit 556a274

File tree

9 files changed

+86
-58
lines changed

9 files changed

+86
-58
lines changed

runtime/doc/gui_mac.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,17 @@ After that, type "mvim" to start MacVim from Terminal. >
205205
$ mvim
206206
You can also specify files to open with. >
207207
$ mvim file ...
208-
Also the bin folder has convenient scripts for diffing and opening file as the
209-
file is read-only. >
210-
* Diff: mvimdiff
211-
* Read-only: mview
212-
<
208+
The bin folder also contains `mvimdiff` and `mview` that work as alias of
209+
|gvimdiff| and |gview|, as well as `xxd` for |hex-editing|.
210+
213211
You can still use the normal "vim", "vimdiff", and "view" commands if you want
214212
to use non-GUI Vim, and "gvim" to launch MacVim ("gvim" works the same way as
215213
"mvim").
216214

215+
If you would like to have man pages with the command-line tools, you can add
216+
the following to `~/.zprofile`: >
217+
export MANPATH="/Applications/MacVim.app/Contents/man:$MANPATH"
218+
<
217219
Going from terminal to GUI mode ~
218220

219221
Once in terminal Vim it is possible to start the MacVim GUI by using the

runtime/doc/vim.1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ vim \- Vi IMproved, a programmer's text editor
2020
.br
2121
.B view
2222
.br
23+
.B mvim
2324
.B gvim
2425
.B gview
2526
.B evim
@@ -111,8 +112,8 @@ view
111112
Start in read-only mode. You will be protected from writing the files.
112113
Can also be done with the "\-R" argument.
113114
.TP
114-
gvim gview
115-
The GUI version.
115+
mvim gvim gview
116+
The GUI version (MacVim).
116117
Starts a new window.
117118
Can also be done with the "\-g" argument.
118119
.TP

runtime/doc/vim.man

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SYNOPSIS
1313

1414
ex
1515
view
16-
gvim gview evim eview
16+
mvim gvim gview evim eview
1717
rvim rview rgvim rgview
1818

1919
DESCRIPTION
@@ -78,9 +78,9 @@ DESCRIPTION
7878
view Start in read-only mode. You will be protected from writing
7979
the files. Can also be done with the "-R" argument.
8080

81-
gvim gview
82-
The GUI version. Starts a new window. Can also be done with
83-
the "-g" argument.
81+
mvim gvim gview
82+
The GUI version (MacVim). Starts a new window. Can also be
83+
done with the "-g" argument.
8484

8585
evim eview
8686
The GUI version in easy mode. Starts a new window. Can also

src/MacVim/MacVim.xcodeproj/project.pbxproj

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,15 @@
5151
1DCD00D20E50B2B700460166 /* TagJump.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00BD0E50B2B700460166 /* TagJump.png */; };
5252
1DCD00D30E50B2B700460166 /* Undo.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00BE0E50B2B700460166 /* Undo.png */; };
5353
1DD04DEC0C529C5E006CDC2B /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 1DD04DEB0C529C5E006CDC2B /* Credits.rtf */; };
54-
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DD0C20A0C60FF9A008CD84A /* gvimrc */; };
54+
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy default vimrc files */ = {isa = PBXBuildFile; fileRef = 1DD0C20A0C60FF9A008CD84A /* gvimrc */; };
5555
1DD3D51E0D82D4C9006E4320 /* ibeam.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DD3D51D0D82D4C9006E4320 /* ibeam.png */; };
5656
1DD66ECE0C803D3600EBDAB3 /* MMApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DD66ECC0C803D3600EBDAB3 /* MMApplication.m */; };
5757
1DD9F5E50C85D60500E8D5A5 /* SystemColors.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */; };
5858
1DE3F8EB0D50F84600052B9E /* MMPreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE3F8E90D50F84600052B9E /* MMPreferenceController.m */; };
59-
1DE608B40C587FDA0055263D /* runtime in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DE602470C587FD10055263D /* runtime */; };
6059
1DE63FFB0E71820F00959BDB /* MMCoreTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE63FFA0E71820F00959BDB /* MMCoreTextView.m */; };
6160
1DE8CC620C5E2AAD003F56E3 /* Actions.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DE8CC610C5E2AAD003F56E3 /* Actions.plist */; };
6261
1DE9B9500D341AB8008FEDD4 /* MMWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE9B94E0D341AB8008FEDD4 /* MMWindow.m */; };
63-
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
62+
1DED78600C6DE43D0079945F /* vimrc in Copy default vimrc files */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
6463
1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
6564
52818B031C1C08CE00F59085 /* QLStephen.qlgenerator in Copy QuickLookPlugin */ = {isa = PBXBuildFile; fileRef = 52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
6665
528DA66A1426D4F9003380F1 /* macvim-askpass in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 528DA6691426D4EB003380F1 /* macvim-askpass */; };
@@ -133,17 +132,16 @@
133132
name = "Copy Frameworks";
134133
runOnlyForDeploymentPostprocessing = 0;
135134
};
136-
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */ = {
135+
1DE608B80C58807F0055263D /* Copy default vimrc files */ = {
137136
isa = PBXCopyFilesBuildPhase;
138137
buildActionMask = 2147483647;
139138
dstPath = vim;
140139
dstSubfolderSpec = 7;
141140
files = (
142-
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */,
143-
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy Vim Runtime Files */,
144-
1DE608B40C587FDA0055263D /* runtime in Copy Vim Runtime Files */,
141+
1DED78600C6DE43D0079945F /* vimrc in Copy default vimrc files */,
142+
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy default vimrc files */,
145143
);
146-
name = "Copy Vim Runtime Files";
144+
name = "Copy default vimrc files";
147145
runOnlyForDeploymentPostprocessing = 0;
148146
};
149147
52818B021C1C088000F59085 /* Copy QuickLookPlugin */ = {
@@ -880,8 +878,9 @@
880878
1D0DCAD80BA3604D00B6CCFA /* Copy Executables */,
881879
1D9EB2840C366D7B0074B739 /* Copy Frameworks */,
882880
52818B021C1C088000F59085 /* Copy QuickLookPlugin */,
883-
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */,
884-
90BD4EF224E0E8B700BF29F2 /* Copy locale message translation files */,
881+
1DE608B80C58807F0055263D /* Copy default vimrc files */,
882+
9050374C2AAEFA2500E9846A /* Generate runtime folder list */,
883+
90BD4EF224E0E8B700BF29F2 /* Copy Vim runtime / localization files */,
885884
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */,
886885
528DA6671426D456003380F1 /* Copy Scripts */,
887886
52283AB71EBA200C00A6F6B9 /* Copy mvim scripts */,
@@ -1054,6 +1053,27 @@
10541053
shellScript = "BINPATH=$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/bin\nmkdir -p \"${BINPATH}\"\ncp -a \"${SRCROOT}/mvim\" \"${BINPATH}/mvim\"\nchmod 755 \"${BINPATH}/mvim\"\n(cd \"${BINPATH}\"; for f in vim vimdiff view gvim gvimdiff gview mvimdiff mview; do ln -fs mvim $f; done)\n";
10551054
showEnvVarsInLog = 0;
10561055
};
1056+
9050374C2AAEFA2500E9846A /* Generate runtime folder list */ = {
1057+
isa = PBXShellScriptBuildPhase;
1058+
alwaysOutOfDate = 1;
1059+
buildActionMask = 2147483647;
1060+
files = (
1061+
);
1062+
inputFileListPaths = (
1063+
);
1064+
inputPaths = (
1065+
);
1066+
name = "Generate runtime folder list";
1067+
outputFileListPaths = (
1068+
);
1069+
outputPaths = (
1070+
"$(OBJROOT)/runtime_folder_list.xcfilelist",
1071+
);
1072+
runOnlyForDeploymentPostprocessing = 0;
1073+
shellPath = /bin/sh;
1074+
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";
1075+
showEnvVarsInLog = 0;
1076+
};
10571077
9099B3CA2914B272005C9F32 /* Clean up build */ = {
10581078
isa = PBXShellScriptBuildPhase;
10591079
alwaysOutOfDate = 1;
@@ -1074,25 +1094,27 @@
10741094
shellScript = "./scripts/cleanup-after-build \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME\" \"$REMOVE_SPARKLE\"\n";
10751095
showEnvVarsInLog = 0;
10761096
};
1077-
90BD4EF224E0E8B700BF29F2 /* Copy locale message translation files */ = {
1097+
90BD4EF224E0E8B700BF29F2 /* Copy Vim runtime / localization files */ = {
10781098
isa = PBXShellScriptBuildPhase;
10791099
buildActionMask = 2147483647;
10801100
files = (
10811101
);
10821102
inputFileListPaths = (
1103+
$OBJROOT/runtime_folder_list.xcfilelist,
10831104
);
10841105
inputPaths = (
1106+
"$(SRCROOT)/../xxd/xxd",
10851107
"$(SRCROOT)/../po",
10861108
);
1087-
name = "Copy locale message translation files";
1109+
name = "Copy Vim runtime / localization files";
10881110
outputFileListPaths = (
10891111
);
10901112
outputPaths = (
1091-
"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/vim/runtime/lang",
1113+
$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/vim/runtime,
10921114
);
10931115
runOnlyForDeploymentPostprocessing = 0;
1094-
shellPath = /bin/sh;
1095-
shellScript = "# Copy all the locale translation files from the po folder to\n# runtime/lang/<lang>/LC_MESSAGES/vim.mo. Need to do this because unlike normal\n# Vim, MacVim is distributed as a standalone app package and therefore we don't\n# want to install these files to a global location (e.g.\n# /usr/local/share/locale/). This is similar to how Windows installation\n# (po/Make_mvc.mak) works.\ncd \"${SRCROOT}\"/..\nmake macvim-install-languages DEST_LANG=\"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/vim/runtime/lang\"\n";
1116+
shellPath = /bin/zsh;
1117+
shellScript = "# Copy the runtime files to the app bundle, under Resources/vim/runtime folder.\n# We cannot do a direct copy of the runtime folder as it contains misc test\n# scripts and also man pages and we should use the Vim's defined rules to\n# install them properly.\n\n# Note that this will also install man pages, under a \"man\" folder. This is\n# useful if the user really wants to point their man page to MacVim's verison\n# instead of builtin Vim, using MANPATH=/Applications/MacVim.app/Contents/man).\n\n# prefix: Reset to empty as it's set to /Applications for fallback rt-folder\n# VIMNAME: Use the default \"vim\" to make sure man pages use that instead of \"Vim\"\n# VIMRTDIR: Make sure to use \"runtime\" as by default it uses a \"vim90\" style folder which is mostly a relic.\n\ncd \"${SRCROOT}\"/..\nmake \\\n DESTDIR=\"${TARGET_BUILD_DIR}\" \\\n prefix= \\\n VIMNAME=vim \\\n VIMRTDIR=/runtime \\\n macvim-install-runtime\n\n# Also add man pages for \"mvim\"\nfor curdir in \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH\"/man/**/man1; do\n (cd $curdir; ln -f -s gvim.1 mvim.1)\ndone\n";
10961118
showEnvVarsInLog = 0;
10971119
};
10981120
90C052E1251E889500E2D81E /* Copy vimtutor */ = {
@@ -1112,10 +1134,11 @@
11121134
outputPaths = (
11131135
$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/bin/vimtutor,
11141136
$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/bin/gvimtutor,
1137+
$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/bin/mvimtutor,
11151138
);
11161139
runOnlyForDeploymentPostprocessing = 0;
11171140
shellPath = /bin/sh;
1118-
shellScript = "BINPATH=$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/bin\nmkdir -p \"${BINPATH}\"\ncp -a \"${SRCROOT}/../vimtutor\" \"${BINPATH}/vimtutor\"\ncp -a \"${SRCROOT}/../gvimtutor\" \"${BINPATH}/gvimtutor\"\nchmod 755 \"${BINPATH}/vimtutor\"\nchmod 755 \"${BINPATH}/gvimtutor\"\ncd \"${BINPATH}\"\nln -fs gvimtutor mvimtutor \n";
1141+
shellScript = "# We could potentially use make installtutorbin installgtutorbin\n# but this works and we need to do the symlink anyway.\nBINPATH=$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/bin\nmkdir -p \"${BINPATH}\"\ncp -a \"${SRCROOT}/../vimtutor\" \"${BINPATH}/vimtutor\"\ncp -a \"${SRCROOT}/../gvimtutor\" \"${BINPATH}/gvimtutor\"\nchmod 755 \"${BINPATH}/vimtutor\"\nchmod 755 \"${BINPATH}/gvimtutor\"\ncd \"${BINPATH}\"\nln -fs gvimtutor mvimtutor \n";
11191142
showEnvVarsInLog = 0;
11201143
};
11211144
/* End PBXShellScriptBuildPhase section */

src/MacVim/scripts/cleanup-after-build

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,3 @@ else
3535
rm "$sparkle_xpcservices_symlink")
3636
fi
3737
fi
38-
39-
# This is a temporary measure to remove unnecessary files in the runtime
40-
# folder. Ideally we should move to use Vim's built-in `make install` mechanism
41-
# instead of copying all the files from the runtime over to the app blindly.
42-
# See https://github.com/macvim-dev/macvim/issues/1417
43-
set -x
44-
rm -rf $macvim_path/Contents/Resources/vim/runtime/indent/testdir
45-
rm -rf $macvim_path/Contents/Resources/vim/runtime/syntax/testdir
46-
rm -f $macvim_path/Contents/Resources/vim/runtime/doc/Makefile
47-
rm -f $macvim_path/Contents/Resources/vim/runtime/indent/Makefile
48-
rm -f $macvim_path/Contents/Resources/vim/runtime/lang/Makefile
49-
rm -f $macvim_path/Contents/Resources/vim/runtime/syntax/Makefile
50-
rm -f $macvim_path/Contents/Resources/vim/runtime/tutor/Makefile

src/MacVim/scripts/sign-developer-id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ else
4242
set -x
4343
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/PSMTabBarControl.framework"
4444
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Library/QuickLook/QLStephen.qlgenerator/Contents/MacOS/QLStephen"
45+
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path/Contents/bin/xxd"
4546
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path/Contents/MacOS/Vim"
4647
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path"
4748
fi

src/Makefile

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ MACVIMGUI_LIBS1 =
12971297
MACVIMGUI_LIBS2 =
12981298
MACVIMGUI_INSTALL = install_normal
12991299
MACVIMGUI_TARGETS =
1300-
MACVIMGUI_MAN_TARGETS =
1300+
MACVIMGUI_MAN_TARGETS = yes
13011301
MACVIMGUI_TESTTARGET = gui
13021302
MACVIMGUI_BUNDLE = macvim
13031303
MACVIMGUI_TESTARG = VIMPROG=../$(RELEASEDIR)/MacVim.app/Contents/MacOS/$(VIMTARGET)
@@ -2365,13 +2365,17 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \
23652365
# Generate the help tags with ":helptags" to handle all languages.
23662366
# Move the distributed tags file aside and restore it, to avoid it being
23672367
# different from the repository.
2368-
cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)" -a -f tags; then \
2369-
mv -f tags tags.dist; fi
2370-
@echo generating help tags
2371-
# We can assume Vim was build, but it may not have been installed,
2372-
# thus use the executable in the current directory.
2373-
-@BUILD_DIR="`pwd`"; cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
2374-
$(MAKE) VIMEXE="$$BUILD_DIR/$(VIMTARGET)" vimtags; fi
2368+
## MacVim: Commented out as we don't need to generate vim tags at runtime
2369+
## anymore as we are guaranteed by CI that vim tags are correct. This step will
2370+
## change the mod dates of the doc/ folder which makes dependency analysis think
2371+
## something has changed.
2372+
## cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)" -a -f tags; then \
2373+
## mv -f tags tags.dist; fi
2374+
## @echo generating help tags
2375+
## # We can assume Vim was build, but it may not have been installed,
2376+
## # thus use the executable in the current directory.
2377+
## -@BUILD_DIR="`pwd`"; cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
2378+
## $(MAKE) VIMEXE="$$BUILD_DIR/$(VIMTARGET)" vimtags; fi
23752379
cd $(HELPSOURCE); \
23762380
files=`ls *.txt tags`; \
23772381
files="$$files `ls *.??x tags-?? 2>/dev/null || true`"; \
@@ -2380,7 +2384,8 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \
23802384
chmod $(HELPMOD) $$files
23812385
$(INSTALL_DATA) $(HELPSOURCE)/*.pl $(DEST_HELP)
23822386
chmod $(SCRIPTMOD) $(DEST_HELP)/*.pl
2383-
cd $(HELPSOURCE); if test -f tags.dist; then mv -f tags.dist tags; fi
2387+
## MacVim: See above for why we shouldn't build vimtags anymore
2388+
## cd $(HELPSOURCE); if test -f tags.dist; then mv -f tags.dist tags; fi
23842389
# install the menu files
23852390
$(INSTALL_DATA) $(SCRIPTSOURCE)/menu.vim $(SYS_MENU_FILE)
23862391
chmod $(VIMSCRIPTMOD) $(SYS_MENU_FILE)
@@ -2620,7 +2625,8 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP)
26202625
fi
26212626
if test -d $(LANGSOURCE); then \
26222627
$(INSTALL_DATA) $(LANGSOURCE)/README.txt $(LANGSOURCE)/*.vim $(DEST_LANG); \
2623-
chmod $(FILEMOD) $(DEST_LANG)/README.txt $(DEST_LANG)/*.vim; \
2628+
$(INSTALL_DATA_R) $(LANGSOURCE)/macvim_menu $(DEST_LANG); \
2629+
chmod $(FILEMOD) $(DEST_LANG)/README.txt $(DEST_LANG)/*.vim $(DEST_LANG)/macvim_menu/*.vim; \
26242630
fi
26252631
if test -d $(KMAPSOURCE); then \
26262632
$(INSTALL_DATA) $(KMAPSOURCE)/README.txt $(KMAPSOURCE)/*.vim $(DEST_KMAP); \
@@ -3634,7 +3640,9 @@ Makefile:
36343640

36353641
##############################################################################
36363642
### MacVim GUI
3637-
.PHONY: macvim macvim-dmg macvimclean macvim-signed macvim-dmg-release macvim-install-languages
3643+
.PHONY: macvim macvim-dmg macvim-dmg-legacy macvimclean macvim-signed macvim-dmg-release macvim-dmg-release-legacy macvim-install-runtime
3644+
3645+
RUNTIME_FOLDER_LIST = MacVim/build/runtime_folder_list.xcfilelist
36383646

36393647
RELEASEDIR = MacVim/build/Release
36403648
DMGDIR = MacVim/build/dmg
@@ -3645,7 +3653,14 @@ ENTITLEMENTS = MacVim/MacVim.entitlements
36453653
DMGFILESYSTEM = APFS
36463654
DMGFORMAT = ULFO
36473655

3648-
macvim: $(VIMTARGET)
3656+
$(RUNTIME_FOLDER_LIST):
3657+
# Generate a stub runtime folder list, used for incremental builds.
3658+
# Xcode's dependnecy management requires this file to exist at start
3659+
# of build, even though this file is only generated during build time.
3660+
mkdir -p MacVim/build
3661+
touch $(RUNTIME_FOLDER_LIST)
3662+
3663+
macvim: $(VIMTARGET) $(RUNTIME_FOLDER_LIST)
36493664
xcodebuild -project MacVim/MacVim.xcodeproj $(XCODEFLAGS)
36503665

36513666
macvim-signed:
@@ -3690,12 +3705,7 @@ macvim-dmg-release-legacy: macvim-signed macvim-dmg-legacy
36903705
@echo "----------------------------------------"
36913706
@echo "Release MacVim (legacy format) built!"
36923707

3693-
# Install only language files to a dest folder. Subset of "install-languages".
3694-
macvim-install-languages:
3695-
@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
3696-
cd $(PODIR); $(MAKE) prefix=$(DESTDIR)$(prefix) LOCALEDIR=$(DEST_LANG) \
3697-
INSTALL_DATA=$(INSTALL_DATA) FILEMOD=$(FILEMOD) install; \
3698-
fi
3708+
macvim-install-runtime: installruntime installmanlinks installtools $(INSTALL_LANGS)
36993709

37003710
###############################################################################
37013711
#

src/auto/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10121,6 +10121,8 @@ printf %s "checking for MacVim GUI... " >&6; }
1012110121
printf "%s\n" "yes" >&6; };
1012210122
GUITYPE=MACVIMGUI
1012310123
datadir='${prefix}/MacVim.app/Contents/Resources'
10124+
mandir='${prefix}/MacVim.app/Contents/man'
10125+
bindir='${prefix}/MacVim.app/Contents/bin'
1012410126
elif test -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
1012510127
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
1012610128
printf %s "checking for Carbon GUI... " >&6; }

src/configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,6 +2778,8 @@ if test "x$MACOS_X" = "xyes"; then
27782778
GUITYPE=MACVIMGUI
27792779
dnl Sorry for the hard coded default
27802780
datadir='${prefix}/MacVim.app/Contents/Resources'
2781+
mandir='${prefix}/MacVim.app/Contents/man'
2782+
bindir='${prefix}/MacVim.app/Contents/bin'
27812783
elif test -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
27822784
AC_MSG_CHECKING(for Carbon GUI)
27832785
dnl already did the check, just give the message

0 commit comments

Comments
 (0)