dotfiles/Makefile

38 lines
1.1 KiB
Makefile
Raw Normal View History

2017-02-17 20:34:59 -05:00
LN_FLAGS = -sfnv
MKDIR_FLAGS = -pv
2019-03-17 12:59:04 -04:00
home_symlinks = aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc mutt zprofile zshrc vimrc vim Xmodmap oh-my-zsh bash_profile tmux.conf
2017-02-17 20:34:59 -05:00
config_copy =
2018-08-21 00:35:54 -04:00
config_symlinks = termite dircolors-solarized i3
2017-02-17 20:34:59 -05:00
2017-11-18 02:10:59 -05:00
all:
2018-08-21 00:35:54 -04:00
local_install: aliases Xresources xbindkeysrc xinitrc offlineimaprc urlview msmtprc mutt zprofile zshrc vimrc vim termite dircolors-solarized oh-my-zsh i3
2017-11-18 02:10:59 -05:00
2019-03-17 12:59:04 -04:00
remote_install: vim vimrc dircolors-solarized zshrc aliases oh-my-zsh zprofile tmux.conf
2017-11-18 02:41:10 -05:00
2017-11-18 02:43:03 -05:00
noroot_install: bash_profile
2017-11-18 02:41:10 -05:00
ctrl_install: Xmodmap
2017-02-17 20:34:59 -05:00
.PHONY: $(home_symlinks)
$(home_symlinks):
$(eval DESTDIR := $(shell dirname ~/.$@))
mkdir $(MKDIR_FLAGS) $(DESTDIR)
test -e $(CURDIR)/$@ && ln $(LN_FLAGS) $(CURDIR)/$@ ~/.$@
.PHONY: $(config_copy)
$(config_copy):
$(eval DESTDIR := $(shell dirname ~/.config/$@))
mkdir $(MKDIR_FLAGS) $(DESTDIR)
test -e $(CURDIR)/$@ && cp --remove-destination -p $(CURDIR)/$@ ~/.config/$@
.PHONY: $(config_symlinks)
$(config_symlinks):
$(eval DESTDIR := $(shell dirname ~/.config/$@))
mkdir $(MKDIR_FLAGS) $(DESTDIR)
test -e $(CURDIR)/$@ && ln $(LN_FLAGS) $(CURDIR)/$@ ~/.config/$@