James Patrick
6c3787ef1b
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.
29 lines
679 B
Makefile
29 lines
679 B
Makefile
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
include ../lib/shared.mk
|
|
RC_TARGET := $(XDG_DIR)/tridactyl
|
|
SCRIPTS_TARGET := ~/.local/share/tridactyl/scripts
|
|
|
|
install: | init update
|
|
|
|
init:
|
|
if [[ $OSTYPE = darwin* ]] ; then
|
|
$(MAKE) -C $(SRC_DIR) setup
|
|
elif (( $$+commands[firefox] )) ; then
|
|
$(MAKE) -C $(SRC_DIR) setup
|
|
else
|
|
$(report) debug "This doesn't seem to be an env for Tridactyl. Skipping."
|
|
fi
|
|
|
|
setup:
|
|
$(report) header "Setting up Tridaycl"
|
|
$(mk_link) $(SRC_DIR) $(RC_TARGET)
|
|
$(mk_link) $(SRC_DIR)/scripts $(SCRIPTS_TARGET)
|
|
|
|
update:
|
|
|
|
remove:
|
|
$(report) header "Removing Tridaycl"
|
|
$(rm_link) $(RC_TARGET)
|
|
$(rm_link) $(SCRIPTS_TARGET)
|