Skip to content

Commit

Permalink
reworked Makefile + gemrc
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly authored and CHANGE committed Aug 15, 2012
1 parent df9c4ee commit 5568384
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
35 changes: 20 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@ help:
@echo When running for the first time its recommended to run clean first to remove prior existing files


LOCAL_AFTER_VIM = ~/.local-after.vim
${LOCAL_AFTER_VIM}:
ln -sfn `pwd`/local-after.vim $@
LOCAL_AFTER_VIM = ~/.local-after.vim
ZSH_LOCAL = ~/.zsh/local
SYSTEM_GITCONFIG = /etc/gitconfig
USER_GITCONFIG = ~/.gitconfig
GEMRC = ~/.gemrc

ZSH_LOCAL = ~/.zsh/local
${ZSH_LOCAL}:
ln -sfn `pwd`/zsh-local $@
TARGETS := ${LOCAL_AFTER_VIM} ${ZSH_LOCAL} ${SYSTEM_GITCONFIG} ${USER_GITCONFIG}

SYSTEM_GITCONFIG = /etc/gitconfig
${SYSTEM_GITCONFIG}:
sudo ln -sfn `pwd`/system-gitconfig $@
${LOCAL_AFTER_VIM}: $(abspath local-after.vim)
@rm -vf $@;ln -svfn $< $@

USER_GITCONFIG = ~/.gitconfig
${USER_GITCONFIG}:
@if grep CHANGE user-gitconfig; then echo EDIT user-gitconfig; false; else ln -svfn `pwd`/user-gitconfig $@; fi
${ZSH_LOCAL}: $(abspath zsh-local)
@rm -vf $@;ln -svfn $< $@

TARGETS := ${LOCAL_AFTER_VIM} ${ZSH_LOCAL} ${SYSTEM_GITCONFIG} ${USER_GITCONFIG}
${SYSTEM_GITCONFIG}: $(abspath system-gitconfig)
@rm -vf $@;sudo ln -svfn $< $@

${USER_GITCONFIG}: $(abspath user-gitconfig)
@if grep CHANGE user-gitconfig; then echo EDIT user-gitconfig; false; else ln -svfn $< $@; fi

${GEMRC}: $(abspath gemrc)
@rm -vf $@;ln -svfn $< $@

install: ${TARGETS}

clean:
sudo rm -f ${SYSTEM_GITCONFIG}
rm -fv ${TARGETS}
sudo rm -vf ${SYSTEM_GITCONFIG}
rm -vf ${TARGETS}
1 change: 1 addition & 0 deletions gemrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gem: --no-ri --no-rdoc

0 comments on commit 5568384

Please sign in to comment.