dotfiles/lib/makefile
James Patrick 6c3787ef1b Refactored to use .ONESHELL
This makes it a hell of a lot simpler but will lose support for BSD
make. All effected machines are running gnu-make, so the cost benefit
ratio ways heavily in favor of doing this.
2020-03-09 13:37:50 -04:00

19 lines
427 B
Makefile

SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
GIT_HOOK_SRC = $(SRC_DIR)/post-merge
GIT_HOOK_TARGET = $(abspath $(SRC_DIR)/..)/.git/hooks/post-merge
include ../lib/shared.mk
install: | init update
init:
$(report) header "Setting up githook"
$(report) pass "Symlinked `ln -svf $(GIT_HOOK_SRC) $(GIT_HOOK_TARGET)`"
update:
remove:
$(report) header "Removing githook"
$(rm_link) $(GIT_HOOK_TARGET)