47 lines
1.2 KiB
Makefile
47 lines
1.2 KiB
Makefile
FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \
|
|
gnomerc gvimrc muttrc
|
|
FILES2 = msmtprc
|
|
|
|
.PHONY: install clean check
|
|
|
|
install: install-conf install-vim-pathogen
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
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-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
|
|
install -m0644 vim-pathogen/autoload/pathogen.vim ~/.vim/autoload/
|
|
|
|
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
|
|
m4 $< >$@
|