dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

Makefile (620B) [raw]


      1 # Makefile -- to compile and install dotfiles
      2 ALL = .cwmrc .exrc .gitconfig .mbsyncrc .shrc .tmux.conf .xsession \
      3       .mailcap .muttrc .config/nvim .csirc .ed_inputrc .inputrc \
      4       .Xresources
      5 
      6 # CURDIR is gmake, .CURDIR is bmake. One will exist!
      7 DOTS = $(CURDIR)$(.CURDIR)
      8 
      9 .PHONY: help
     10 help:
     11 	@echo run \"make install\" to symlink dotfiles to $(HOME)
     12 
     13 .PHONY: install
     14 install: build
     15 	@mkdir -p $$HOME/.config
     16 	@for f in $(ALL); do \
     17 		if [ -e "$$HOME/$$f" ]; then \
     18 			echo "Up to date: $$f" 1>&2; \
     19 		else \
     20 			echo "Installed:  $$HOME/$$f -> $(DOTS)/$$f"; \
     21 			ln -s "$(DOTS)/$$f" "$$HOME/$$f"; \
     22 		fi \
     23 	done