simplify install with a Makefile
authorBart Trojanowski <bart@jukie.net>
Thu, 19 Nov 2009 02:00:56 +0000 (21:00 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:49 +0000 (00:48 -0500)
vim/Makefile [new file with mode: 0644]

diff --git a/vim/Makefile b/vim/Makefile
new file mode 100644 (file)
index 0000000..89e18be
--- /dev/null
@@ -0,0 +1,24 @@
+.PHONY: all help install link symlink
+
+FILES     = plugin/notmuch.vim \
+           $(wildcard syntax/notmuch-*.vim)
+
+PREFIX    = $(shell ls -d ~/.vim/)
+
+OUT_FILES = $(FILES:%=${PREFIX}/%)
+
+all: help
+
+help:
+       @echo "I don't actually build anything, but I will help you install"
+       @echo "notmuch support for vim."
+       @echo
+       @echo "    make install     - copy plugin scripts and syntax files to ~/.vim"
+       @echo "    make symlink     - create symlinks in ~/.vim (useful for development)"
+
+install: ${OUT_FILES}
+link symlink:
+       ${MAKE} SYMLINK=1 install
+
+${OUT_FILES}: ${PREFIX}/%: %
+       $(if ${SYMLINK},ln -fs,cp) `pwd`/$< $@