diff --git a/Makefile b/Makefile index 38487b1..6f2bba0 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,24 @@ FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \ gnomerc gvimrc muttrc FILES2 = msmtprc -.PHONY: all install clean check +.PHONY: install clean check -all: $(FILES) +install: install-conf install-vim-pathogen ifeq ($(OS),Windows_NT) -install: +install-conf: mkdir -p $(HOME)\vimfiles\autoload cp gitconfig $(HOME)\.gitconfig cp vimrc $(HOME)\_vimrc cp gvimrc $(HOME)\_gvimrc cp vim-pathogen/autoload/pathogen.vim $(HOME)\vimfiles\autoload +VIM_PATHOGEN_DIR = $(HOME)\vimfiles\bundle + else -install: $(FILES) +install-conf: $(FILES) mkdir -p ~/.ssh ~/.vim/autoload for i in $(FILES); do install -m0644 $$i ~/.$$i; done for i in $(FILES2); do install -m0600 $$i ~/.$$i; done @@ -26,8 +28,18 @@ install: $(FILES) check: $(FILES) for i in $(FILES); do diff -u ~/.$$i $$i; done +VIM_PATHOGEN_DIR = $(HOME)/.vim/bundle + endif +vim_inst_bundle = cd $(subst \,/,$(VIM_PATHOGEN_DIR)) && if cd $(1); then git pull; else git clone $(2); fi + +install-vim-pathogen: + mkdir -p $(VIM_PATHOGEN_DIR) + $(call vim_inst_bundle, vim-sensible, https://github.com/tpope/vim-sensible.git) + $(call vim_inst_bundle, jellybeans.vim, https://github.com/nanotech/jellybeans.vim.git) + $(call vim_inst_bundle, vim-coffee-script, https://github.com/kchmck/vim-coffee-script.git) + clean: %: %.m4