2013-04-27 08:51:39 +00:00
|
|
|
FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \
|
2014-09-25 15:23:18 +00:00
|
|
|
gnomerc gvimrc muttrc pentadactylrc vimperatorrc mailcap latexmkrc
|
2013-11-01 18:27:13 +00:00
|
|
|
FILES2 = msmtprc
|
2008-03-16 21:02:24 +00:00
|
|
|
|
2013-12-29 17:46:59 +00:00
|
|
|
.PHONY: install clean check
|
2011-07-28 20:05:16 +00:00
|
|
|
|
2014-10-09 09:36:13 +00:00
|
|
|
install: install-conf install-vim-plug
|
2011-07-28 20:05:16 +00:00
|
|
|
|
2013-12-29 17:32:58 +00:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
|
2015-01-03 11:17:43 +00:00
|
|
|
HOME = $(HOMEDRIVE)$(HOMEPATH)
|
|
|
|
|
2015-01-03 15:31:35 +00:00
|
|
|
install-conf: $(FILES) $(FILES2)
|
2013-12-29 17:32:58 +00:00
|
|
|
cp gitconfig $(HOME)\.gitconfig
|
|
|
|
cp vimrc $(HOME)\_vimrc
|
|
|
|
cp gvimrc $(HOME)\_gvimrc
|
|
|
|
|
2015-01-03 11:17:43 +00:00
|
|
|
VIM_DIR = $(HOME)\vimfiles
|
|
|
|
|
|
|
|
install-vim-plug:
|
|
|
|
test -d $(VIM_DIR)\autoload || mkdir $(VIM_DIR)\autoload
|
|
|
|
test -f $(VIM_DIR)/autoload/plug.vim || curl -k -fLo $(VIM_DIR)/autoload/plug.vim \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
2013-12-29 17:46:59 +00:00
|
|
|
|
2013-12-29 17:32:58 +00:00
|
|
|
else
|
|
|
|
|
2015-01-03 15:29:22 +00:00
|
|
|
install-conf: $(FILES) $(FILES2)
|
2011-07-28 20:05:16 +00:00
|
|
|
for i in $(FILES); do install -m0644 $$i ~/.$$i; done
|
2013-11-01 18:27:13 +00:00
|
|
|
for i in $(FILES2); do install -m0600 $$i ~/.$$i; done
|
2011-07-28 20:05:16 +00:00
|
|
|
|
2013-04-27 08:51:39 +00:00
|
|
|
check: $(FILES)
|
|
|
|
for i in $(FILES); do diff -u ~/.$$i $$i; done
|
2011-07-28 20:05:16 +00:00
|
|
|
|
2014-10-09 09:36:13 +00:00
|
|
|
VIM_DIR = $(HOME)/.vim
|
2013-12-29 17:46:59 +00:00
|
|
|
|
2014-10-09 09:36:13 +00:00
|
|
|
install-vim-plug:
|
|
|
|
mkdir -p $(VIM_DIR)/autoload
|
2015-01-03 11:17:43 +00:00
|
|
|
test -f $(VIM_DIR)/autoload/plug.vim || curl -fLo $(VIM_DIR)/autoload/plug.vim \
|
2014-10-09 09:36:13 +00:00
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
2013-12-29 17:46:59 +00:00
|
|
|
|
2015-01-03 11:17:43 +00:00
|
|
|
endif
|
|
|
|
|
2013-12-29 17:32:58 +00:00
|
|
|
clean:
|
|
|
|
|
2011-07-28 20:05:16 +00:00
|
|
|
%: %.m4
|
|
|
|
m4 $< >$@
|