etc/Makefile

71 lines
1.7 KiB
Makefile
Raw Normal View History

2015-09-20 10:48:18 +02:00
FILES = bashrc bash_profile vimrc zshrc gitconfig screenrc commonshrc liquidpromptrc \
2018-03-25 16:07:09 +02:00
neomuttrc pentadactylrc mailcap latexmkrc ctags \
2018-03-26 11:27:28 +02:00
i3/config i3status.conf config/dunst/dunstrc msmtprc spacemacs emacs.d mbsyncrc authinfo \
2017-06-18 09:33:47 +02:00
config/qutebrowser config/nvim/init.vim ideavimrc \
2016-06-18 20:53:26 +02:00
config/khal config/vdirsyncer/config config/khard \
2017-06-18 14:56:56 +02:00
config/rofi-pass gdbinit notmuch-config \
2018-11-19 12:30:50 +01:00
config/fish tridactylrc \
2017-09-07 09:40:52 +02:00
$(wildcard sbt/0.13/*.sbt sbt/0.13/plugins/*.sbt) \
$(wildcard sbt/1.0/plugins/*.sbt)
2013-12-29 18:46:59 +01:00
.PHONY: install clean check
2011-07-28 22:05:16 +02:00
install: install-conf install-vim-plug
2011-07-28 22:05:16 +02:00
2013-12-29 18:32:58 +01:00
ifeq ($(OS),Windows_NT)
2015-01-03 12:17:43 +01:00
HOME = $(HOMEDRIVE)$(HOMEPATH)
2015-01-03 16:31:35 +01:00
install-conf: $(FILES) $(FILES2)
2013-12-29 18:32:58 +01:00
cp gitconfig $(HOME)\.gitconfig
cp vimrc $(HOME)\_vimrc
cp gvimrc $(HOME)\_gvimrc
2015-01-03 12:17:43 +01:00
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
2013-12-29 18:46:59 +01:00
2013-12-29 18:32:58 +01:00
else
2015-09-20 08:36:24 +02:00
.PHONY: install-conf
2015-10-28 08:35:58 +01:00
install-conf: $(FILES) $(foreach i,$(FILES),install-file/$(i))
2011-07-28 22:05:16 +02:00
2015-09-20 08:36:24 +02:00
install-file/%: %
mkdir -p ~/.$(dir $<) && ln -Trsf $< ~/.$<
2011-07-28 22:05:16 +02:00
2016-01-02 14:00:41 +01:00
VIM_DIR = $(HOME)/.config/nvim
2013-12-29 18:46:59 +01:00
install-vim-plug:
2018-11-18 11:45:24 +01:00
mkdir -p ~/.vim/plugged
mkdir -p $(VIM_DIR)/autoload
2015-01-03 12:17:43 +01:00
test -f $(VIM_DIR)/autoload/plug.vim || curl -fLo $(VIM_DIR)/autoload/plug.vim \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
2016-01-02 14:00:41 +01:00
cp $(VIM_DIR)/autoload/plug.vim $(HOME)/.vim
2013-12-29 18:46:59 +01:00
2016-06-18 19:21:46 +02:00
config/vdirsyncer/config: config/vdirsyncer/config.m4
umask 077; m4 $< >$@
2017-06-18 15:00:04 +02:00
msmtprc: msmtprc.m4
umask 077; m4 $< >$@
mbsyncrc: mbsyncrc.m4
umask 077; m4 $< >$@
authinfo: authinfo.m4
umask 077; m4 $< >$@
2015-01-03 12:17:43 +01:00
endif
2013-12-29 18:32:58 +01:00
clean:
2015-02-09 14:00:14 +01:00
$(RM) gitconfig ctags
ctags: ctags.in
grep '^-' $< >$@
2013-12-29 18:32:58 +01:00
2015-11-22 09:21:47 +01:00
%: %.m4 base16.m4
2011-07-28 22:05:16 +02:00
m4 $< >$@