makefile: use symlinks.

This commit is contained in:
Gabriel Ebner 2015-09-20 08:36:24 +02:00
parent aa5a78204f
commit 1d74e87999

@ -1,7 +1,6 @@
FILES = bashrc vimrc zshrc gitconfig screenrc commonshrc \ FILES = bashrc vimrc zshrc gitconfig screenrc commonshrc \
gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc ctags \ gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc ctags \
i3/config i3status.conf i3/config i3status.conf msmtprc spacemacs emacs.d
FILES2 = msmtprc
.PHONY: install clean check .PHONY: install clean check
@ -25,14 +24,12 @@ install-vim-plug:
else else
install-conf: $(FILES) $(FILES2) .PHONY: install-conf
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) install-conf: $(foreach i,$(FILES),install-file/$(i))
for i in $(FILES); do diff -u ~/.$$i $$i; done
install-file/%: %
mkdir -p ~/.$(dir $<) && ln -Trsf $< ~/.$<
VIM_DIR = $(HOME)/.vim VIM_DIR = $(HOME)/.vim