forked from XVimProject/XVim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.07 KB
/
Makefile
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
xcodebuild:=xcodebuild -configuration
.PHONY: release debug clean clean-release clean-debug uninstall uuid
release: uuid
$(xcodebuild) Release
debug: uuid
$(xcodebuild) Debug
clean: clean-release clean-debug
clean-release:
$(xcodebuild) Release clean
clean-debug:
$(xcodebuild) Debug clean
uninstall:
rm -rf "$(HOME)/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin"
uuid:
@xcode_path=`xcode-select -p`; \
uuid=`defaults read $${xcode_path}/../Info DVTPlugInCompatibilityUUID`; \
xcode_version=`defaults read $${xcode_path}/../Info CFBundleShortVersionString`; \
grep $${uuid} XVim/Info.plist > /dev/null ; \
if [ $$? -ne 0 ]; then \
printf "XVim hasn't been confirmed the compatibility with your Xcode Version $${xcode_version}\n"; \
printf "Do you want to compile XVim with support Xcode Version $${xcode_version} at your own risk? (y/N)"; \
read -r -n 1 in; \
if [[ $$in != "" && ( $$in == "y" || $$in == "Y") ]]; then \
plutil -insert DVTPlugInCompatibilityUUIDs.0 -string $${uuid} XVim/Info.plist; \
fi ;\
printf "\n"; \
fi ;