diff --git a/grimblast/Makefile b/grimblast/Makefile index 8087e5f..193ab9f 100644 --- a/grimblast/Makefile +++ b/grimblast/Makefile @@ -1,6 +1,10 @@ -PREFIX ?= /usr -BINDIR ?= $(PREFIX)/bin -MANDIR ?= $(PREFIX)/share/man +DESTDIR ?= / +PREFIX ?= $(DESTDIR)usr/local +EXEC_PREFIX ?= $(PREFIX) +DATAROOTDIR ?= $(PREFIX)/share +BINDIR ?= $(EXEC_PREFIX)/bin +MANDIR ?= $(DATAROOTDIR)/man +MAN1DIR ?= $(MANDIR)/man1 all: grimblast.1 @@ -8,5 +12,9 @@ grimblast.1: grimblast.1.scd scdoc < $< > $@ install: grimblast.1 grimblast - @install -v -D -m 0644 grimblast.1 --target-directory "$(MANDIR)/man1" + @install -v -D -m 0644 grimblast.1 --target-directory "$(MAN1DIR)" @install -v -D -m 0755 grimblast --target-directory "$(BINDIR)" + +uninstall: grimblast.1 grimblast + rm "$(MAN1DIR)/grimblast.1" + rm "$(BINDIR)/grimblast" diff --git a/hyprprop/Makefile b/hyprprop/Makefile index f920031..054d309 100644 --- a/hyprprop/Makefile +++ b/hyprprop/Makefile @@ -1,6 +1,10 @@ -PREFIX ?= /usr -BINDIR ?= $(PREFIX)/bin -MANDIR ?= $(PREFIX)/share/man +DESTDIR ?= / +PREFIX ?= $(DESTDIR)usr/local +EXEC_PREFIX ?= $(PREFIX) +DATAROOTDIR ?= $(PREFIX)/share +BINDIR ?= $(EXEC_PREFIX)/bin +MANDIR ?= $(DATAROOTDIR)/man +MAN1DIR ?= $(MANDIR)/man1 all: hyprprop.1 @@ -8,5 +12,9 @@ hyprprop.1: hyprprop.1.scd scdoc < $< > $@ install: hyprprop.1 hyprprop - @install -v -D -m 0644 hyprprop.1 --target-directory "$(MANDIR)/man1" + @install -v -D -m 0644 hyprprop.1 --target-directory "$(MAN1DIR)" @install -v -D -m 0755 hyprprop --target-directory "$(BINDIR)" + +uninstall: hyprprop.1 hyprprop + rm "$(MAN1DIR)/hyprprop.1" + rm "$(BINDIR)/hyprprop" diff --git a/scratchpad/Makefile b/scratchpad/Makefile index f45d3ab..2bbc1de 100644 --- a/scratchpad/Makefile +++ b/scratchpad/Makefile @@ -1,5 +1,7 @@ -PREFIX ?= /usr -BINDIR ?= $(PREFIX)/bin +DESTDIR ?= / +PREFIX ?= $(DESTDIR)usr/local +EXEC_PREFIX ?= $(PREFIX) +BINDIR ?= $(EXEC_PREFIX)/bin install: scratchpad @install -v -D -m 0755 scratchpad --target-directory "$(BINDIR)" diff --git a/shellevents/Makefile b/shellevents/Makefile index 1a936ff..94b0223 100644 --- a/shellevents/Makefile +++ b/shellevents/Makefile @@ -1,5 +1,11 @@ -PREFIX ?= /usr -BINDIR ?= $(PREFIX)/bin +DESTDIR ?= / +PREFIX ?= $(DESTDIR)usr/local +EXEC_PREFIX ?= $(PREFIX) +BINDIR ?= $(EXEC_PREFIX)/bin install: shellevents shellevents_default.sh @install -v -D -m 0755 shellevents shellevents_default.sh --target-directory "$(BINDIR)" + +uninstall: shellevents shellevents_default.sh + rm "$(BINDIR)/shellevents" + rm "$(BINDIR)/shellevents_default.sh" diff --git a/try_swap_workspace/Makefile b/try_swap_workspace/Makefile index 3eb7204..dbaf394 100644 --- a/try_swap_workspace/Makefile +++ b/try_swap_workspace/Makefile @@ -1,5 +1,7 @@ -PREFIX ?= /usr -BINDIR ?= $(PREFIX)/bin +DESTDIR ?= / +PREFIX ?= $(DESTDIR)usr/local +EXEC_PREFIX ?= $(PREFIX) +BINDIR ?= $(EXEC_PREFIX)/bin install: try_swap_workspace @install -v -D -m 0755 try_swap_workspace --target-directory "$(BINDIR)"