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.
27 lines
569 B
Makefile
27 lines
569 B
Makefile
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
include ../lib/shared.mk
|
|
TARGET := $(XDG_DIR)/sway
|
|
|
|
install: | init update
|
|
|
|
init:
|
|
if (( ! $$+commands[sway] )) ; then
|
|
$(report) debug "Sway not installed. Skipping."
|
|
else
|
|
$(report) header "Setting up sway"
|
|
$(mk_link) $(SRC) $(TARGET)
|
|
fi
|
|
|
|
update:
|
|
if (( ! $$+commands[swaymsg] )) ; then
|
|
$(report) debug "swaymsg not installed. Skipping."
|
|
else
|
|
$(report) header "Reloading sway"
|
|
swaymsg reload ; $(report) "sway reload"
|
|
fi
|
|
|
|
remove:
|
|
$(report) header "Removing sway"
|
|
$(rm_link) $(TARGET)
|