diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2012-02-22 18:57:56 +0200 |
---|---|---|
committer | Felipe Contreras <felipe.contreras@gmail.com> | 2012-04-21 05:19:30 +0300 |
commit | 85e991affc952faa13b7a36e109c0c4360fb98c9 (patch) | |
tree | 91ae2261d6ac5f31517e9972101c23348d7403ff /vim | |
parent | ae525b7e5b980a949e00b79f9cd5e9a5c1b30c8f (diff) |
vim: simplify build
There should be no functional changes, except that you don't need to
make the directories before installing.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'vim')
-rw-r--r-- | vim/Makefile | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/vim/Makefile b/vim/Makefile index 89e18be1..f17bebfe 100644 --- a/vim/Makefile +++ b/vim/Makefile @@ -1,11 +1,11 @@ .PHONY: all help install link symlink -FILES = plugin/notmuch.vim \ - $(wildcard syntax/notmuch-*.vim) +files = plugin/notmuch.vim \ + $(wildcard syntax/notmuch-*.vim) +prefix = $(HOME)/.vim +destdir = $(prefix)/plugin -PREFIX = $(shell ls -d ~/.vim/) - -OUT_FILES = $(FILES:%=${PREFIX}/%) +INSTALL = install -D -m644 all: help @@ -16,9 +16,8 @@ help: @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 +install: + @for x in $(files); do $(INSTALL) $(CURDIR)/$$x $(prefix)/$$x; done -${OUT_FILES}: ${PREFIX}/%: % - $(if ${SYMLINK},ln -fs,cp) `pwd`/$< $@ +link symlink: INSTALL = ln -fs +link symlink: install |