summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-11-02 10:19:12 +0800
committerGuangxiong Lin <[email protected]>2022-11-02 10:19:12 +0800
commit7353932f6d6fbf0b791a159d29c1933902a7d00d (patch)
tree46aba1a910b02bf2c1e7705d3ddeb7c9504f578d /Makefile
parent9d806fd9bf0f84a1362884d289896ab220395e5a (diff)
downloadwd-7353932f6d6fbf0b791a159d29c1933902a7d00d.tar.gz
wd-7353932f6d6fbf0b791a159d29c1933902a7d00d.tar.bz2
wd-7353932f6d6fbf0b791a159d29c1933902a7d00d.zip
Install binary to /usr/local by default
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 7d61d55..1a866ee 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
PROG ?= wd
-PREFIX ?= /usr
+PREFIX ?= /usr/local
DESTDIR ?=
-BINDIR ?= $(PREFIX)/bin
all:
@echo "$(PROG) is a shell script and doesn't need compilation. It can be simply executed."
@@ -14,15 +13,15 @@ install:
"$(PROG)" \
"$(PROG)-journal" \
"$(PROG)-edit" \
- "$(DESTDIR)$(BINDIR)"
+ "$(DESTDIR)$(PREFIX)/bin"
@echo
@echo "$(PROG) is installed succesfully"
@echo
uninstall:
@rm -vrf \
- "$(DESTDIR)$(BINDIR)/$(PROG)" \
- "$(DESTDIR)$(BINDIR)/$(PROG)-journal" \
- "$(DESTDIR)$(BINDIR)/$(PROG)-edit"
+ "$(DESTDIR)$(PREFIX)/bin/$(PROG)" \
+ "$(DESTDIR)$(PREFIX)/bin/$(PROG)-journal" \
+ "$(DESTDIR)$(PREFIX)/bin/$(PROG)-edit"
.PHONY: all install uninstall