dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/dotfiles
Log | Files | Refs

commit e8079b00b49a960e7ca8b66bebd165a45ae7838e
parent 6ce0e7f8fde8ace1461547348dab3cd8a57ae60b
Author: Ed van Bruggen <edvb54@gmail.com>
Date:   Thu, 31 Mar 2016 16:01:20 -0700

Make: Add Makefile for main dotfiles and config.h files

Diffstat:
Makefile | 48++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,48 @@ +CURDIR ?= $(.CURDIR) +TARGET = ~/remote +TARGETCONH = ~/remote/code/downloads + +symlinks = bash_profile \ + bashrc \ + conkyrc \ + dircolors \ + emacs \ + gitconfig \ + nvimrc \ + terminfo \ + themes \ + tmux \ + tmux.conf \ + vim \ + vimrc \ + vimrc.bundles \ + zshrc + +confighlink = dmenu \ + tabbed \ + st + +all: + @echo to install dotfiles to $(TARGET) run \'make install\' + +install: $(symlinks) $(confighlink) + ln -fsn $(CURDIR)/bin $(TARGET)/bin + +$(symlinks): + @if [ -e $(TARGET)/.$@ ]; then \ + if [ -L $(TARGET)/.$@ ]; then \ + rm -f $(TARGET)/.$@; \ + else \ + echo mv $(TARGET)/.$@ $(TARGET)/$@-old; \ + mv $(TARGET)/.$@ $(TARGET)/$@-old; \ + fi \ + fi + ln -sn $(CURDIR)/$@ $(TARGET)/.$@ + +$(confighlink): + @if [ -e $(TARGETCONH)/$@ ]; then \ + echo ln -fsn $(CURDIR)/config.h/$@.config.h $(TARGETCONH)/$@/config.h; \ + ln -fsn $(CURDIR)/config.h/$@.config.h $(TARGETCONH)/$@/config.h; \ + fi + +.PHONY: all install $(symlinks) $(confighlink)