etc/Makefile

41 lines
893 B
Makefile
Raw Normal View History

2013-04-27 10:51:39 +02:00
FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \
2014-07-13 13:29:14 +02:00
gnomerc gvimrc muttrc pentadactylrc
2013-11-01 19:27:13 +01:00
FILES2 = msmtprc
2013-12-29 18:46:59 +01:00
.PHONY: install clean check
2011-07-28 22:05:16 +02:00
2014-06-14 19:47:10 +02:00
install: install-conf install-vim-neobundle
2011-07-28 22:05:16 +02:00
2013-12-29 18:32:58 +01:00
ifeq ($(OS),Windows_NT)
2013-12-29 18:46:59 +01:00
install-conf:
2013-12-29 18:32:58 +01:00
mkdir -p $(HOME)\vimfiles\autoload
cp gitconfig $(HOME)\.gitconfig
cp vimrc $(HOME)\_vimrc
cp gvimrc $(HOME)\_gvimrc
VIM_BUNDLE_DIR = $(HOME)/vimfiles/bundle
2013-12-29 18:46:59 +01:00
2013-12-29 18:32:58 +01:00
else
2013-12-29 18:46:59 +01:00
install-conf: $(FILES)
2013-05-19 23:33:53 +02:00
mkdir -p ~/.ssh ~/.vim/autoload
2011-07-28 22:05:16 +02:00
for i in $(FILES); do install -m0644 $$i ~/.$$i; done
2013-11-01 19:27:13 +01:00
for i in $(FILES2); do install -m0600 $$i ~/.$$i; done
2011-07-28 22:05:16 +02:00
2013-04-27 10:51:39 +02:00
check: $(FILES)
for i in $(FILES); do diff -u ~/.$$i $$i; done
2011-07-28 22:05:16 +02:00
VIM_BUNDLE_DIR = $(HOME)/.vim/bundle
2013-12-29 18:46:59 +01:00
2013-12-29 18:32:58 +01:00
endif
2014-06-14 19:47:10 +02:00
install-vim-neobundle:
mkdir -p $(VIM_BUNDLE_DIR)
2014-06-14 19:47:10 +02:00
test -d $(VIM_BUNDLE_DIR)/neobundle.vim || git clone https://github.com/Shougo/neobundle.vim.git $(VIM_BUNDLE_DIR)/neobundle.vim
2013-12-29 18:46:59 +01:00
2013-12-29 18:32:58 +01:00
clean:
2011-07-28 22:05:16 +02:00
%: %.m4
m4 $< >$@