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) HOME = $(HOMEDRIVE)$(HOMEPATH) install-conf: $(FILES) $(FILES2) cp gitconfig $(HOME)\.gitconfig cp vimrc $(HOME)\_vimrc cp gvimrc $(HOME)\_gvimrc 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 else install-conf: $(FILES) $(FILES2) 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 install-vim-plug: mkdir -p $(VIM_DIR)/autoload test -f $(VIM_DIR)/autoload/plug.vim || curl -fLo $(VIM_DIR)/autoload/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif clean: %: %.m4 m4 $< >$@