FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \ gnomerc gvimrc muttrc pentadactylrc vimperatorrc mailcap latexmkrc FILES2 = msmtprc .PHONY: install clean check install: install-conf install-vim-plug ifeq ($(OS),Windows_NT) install-conf: mkdir -p $(HOME)\vimfiles\autoload cp gitconfig $(HOME)\.gitconfig cp vimrc $(HOME)\_vimrc cp gvimrc $(HOME)\_gvimrc VIM_DIR = $(HOME)/vimfiles 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 check: $(FILES) for i in $(FILES); do diff -u ~/.$$i $$i; done VIM_DIR = $(HOME)/.vim endif install-vim-plug: mkdir -p $(VIM_DIR)/autoload test -f $(VIM_DIR)/autoload/plug.vim || curl -fLo ~/.vim/autoload/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim clean: %: %.m4 m4 $< >$@