FILES = bashrc vimrc zshrc gitconfig screenrc commonshrc \ gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc ctags \ i3/config i3status.conf 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 -Dm0644 $$i ~/.$$i; done for i in $(FILES2); do install -Dm0600 $$i ~/.$$i; done ln -sf $(PWD)/spacemacs ~/.spacemacs test -d ~/.emacs.d || ln -s $(PWD)/emacs.d ~/.emacs.d 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: $(RM) gitconfig ctags ctags: ctags.in grep '^-' $< >$@ %: %.m4 m4 $< >$@