dotfiles/lib/shared.mk
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

23 lines
610 B
Makefile

_SHELL := $(shell which zsh )
ifndef _SHELL
$(error ZSH is not installed on this machine. This makefile requires ZSH features)
endif
SHELL := $(_SHELL)
.ONESHELL:
# Helper scripts for setting up and taking down links.
LIB_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
mk_link := $(LIB_DIR)/helper/mk_link
rm_link := $(LIB_DIR)/helper/rm_link
report := LAST_RETURN=$$? $(LIB_DIR)/helper/report
# Shortcut for the XDG dir if it exist. default to ~/.confg
XDG_DIR := $${XDG_CONFIG_HOME:-~/.config}
# TURN THIS OFF FOR DEBUGGING
MAKEFLAGS += --silent
.PHONY: install update init remove