aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile52
1 files changed, 20 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index f0d87a4..1589ccf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,38 +1,26 @@
-PREFIX = /usr
-BINDIR = $(PREFIX)/bin
-DATADIR = $(PREFIX)/share
-MANDIR = $(DATADIR)/man
-LICENSEDIR = $(DATADIR)/license
+.POSIX:
-PKGNAME = blue
-COMMAND = blue
+PREFIX = /usr
+MANPREFIX = $(PREFIX)/share/man
all:
-clean:
-
-install: install-cmd install-doc install-license
-install-doc: install-man
-
-install-cmd:
- mkdir -p -- "$(DESTDIR)$(BINDIR)"
- cp -- blue.py "$(DESTDIR)$(BINDIR)/$(COMMAND)"
- chmod 0755 -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ @:
+
+install:
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/blue"
+ cp -- blue "$(DESTDIR)$(PREFIX)/bin/"
+ cp -- blue.1 "$(DESTDIR)$(MANDIR)/man1/"
+ cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/blue/"
+
+uninstall:
+ -rm -f -- "$(DESTDIR)$(PREFIX)/bin/blue"
+ -rm -f -- blue.1 "$(DESTDIR)$(MANPREFIX)/man1/blue.1"
+ -rm -f -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/blue/LICENSE"
+ -rmdir -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/blue"
-install-man:
- mkdir -p -- "$(DESTDIR)$(MANDIR)/man1"
- cp -- blue.py "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1"
- chmod 0644 -- "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1"
-
-install-license:
- mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
- cp -- LICENSE "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
- chmod 0644 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
-
-uninstall:
- -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
- -rm -- "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1"
- -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
- -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+clean:
+ @:
.PHONY: all install uninstall clean
-.PHONY: install-cmd install-doc install-man install-license