unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] vim: simplify build
@ 2012-04-18 12:11 Felipe Contreras
  2012-04-18 13:11 ` Tomi Ollila
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2012-04-18 12:11 UTC (permalink / raw)
  To: notmuch

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>
---
 vim/Makefile |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/vim/Makefile b/vim/Makefile
index 89e18be..e7b7faa 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) $(PWD)/$$x $(prefix)/$$x; done
 
-${OUT_FILES}: ${PREFIX}/%: %
-	$(if ${SYMLINK},ln -fs,cp) `pwd`/$< $@
+link symlink: INSTALL = ln -fs
+link symlink: install
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-21  2:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 12:11 [PATCH] vim: simplify build Felipe Contreras
2012-04-18 13:11 ` Tomi Ollila
2012-04-18 13:41   ` Felipe Contreras
2012-04-18 14:58     ` David Bremner
2012-04-18 15:40       ` Tomi Ollila
2012-04-18 15:57         ` Felipe Contreras
2012-04-18 16:03           ` Tomi Ollila
2012-04-21  2:21             ` Felipe Contreras

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).