74 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			74 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
FILES = bashrc bash_profile vimrc zshrc gitconfig screenrc commonshrc liquidpromptrc \
 | 
						|
	neomuttrc pentadactylrc mailcap latexmkrc ctags \
 | 
						|
	i3/config i3status.conf config/dunst/dunstrc msmtprc spacemacs emacs.d mbsyncrc authinfo \
 | 
						|
	config/qutebrowser config/nvim/init.vim config/nvim/ginit.vim ideavimrc \
 | 
						|
	config/khal config/vdirsyncer/config config/khard \
 | 
						|
	config/rofi config/rofi-pass gdbinit notmuch-config \
 | 
						|
	tridactylrc config/sway/config config/mpv/mpv.conf \
 | 
						|
	config/wofi config/waybar \
 | 
						|
	config/fish \
 | 
						|
	viebrc config/Vieb/colors \
 | 
						|
	$(wildcard sbt/0.13/*.sbt sbt/0.13/plugins/*.sbt) \
 | 
						|
	$(wildcard sbt/1.0/plugins/*.sbt)
 | 
						|
 | 
						|
.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
 | 
						|
 | 
						|
.PHONY: install-conf
 | 
						|
 | 
						|
install-conf: $(FILES) $(foreach i,$(FILES),install-file/$(i))
 | 
						|
 | 
						|
install-file/%: %
 | 
						|
	mkdir -p ~/.$(dir $<) && ln -Trsf $< ~/.$<
 | 
						|
 | 
						|
VIM_DIR = $(HOME)/.config/nvim
 | 
						|
 | 
						|
install-vim-plug:
 | 
						|
	mkdir -p ~/.vim/plugged
 | 
						|
	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
 | 
						|
	cp $(VIM_DIR)/autoload/plug.vim $(HOME)/.vim
 | 
						|
 | 
						|
config/vdirsyncer/config: config/vdirsyncer/config.m4
 | 
						|
	umask 077; m4 $< >$@
 | 
						|
 | 
						|
msmtprc: msmtprc.m4
 | 
						|
	umask 077; m4 $< >$@
 | 
						|
 | 
						|
mbsyncrc: mbsyncrc.m4
 | 
						|
	umask 077; m4 $< >$@
 | 
						|
 | 
						|
authinfo: authinfo.m4
 | 
						|
	umask 077; m4 $< >$@
 | 
						|
 | 
						|
endif
 | 
						|
 | 
						|
clean:
 | 
						|
	$(RM) gitconfig ctags
 | 
						|
 | 
						|
ctags: ctags.in
 | 
						|
	grep '^-' $< >$@
 | 
						|
 | 
						|
%: %.m4 base16.m4
 | 
						|
	m4 $< >$@
 |