aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-02-20 00:40:19 +0100
committerMattias Andrée <maandree@kth.se>2021-02-20 00:40:19 +0100
commit4a73ba328f374320ee36a77439b7c4fd58d5b84c (patch)
treead473b3acb4cdafe8cbc2d2a049d6d892a057b72 /Makefile
parentm rationale (diff)
downloadblue-4a73ba328f374320ee36a77439b7c4fd58d5b84c.tar.gz
blue-4a73ba328f374320ee36a77439b7c4fd58d5b84c.tar.bz2
blue-4a73ba328f374320ee36a77439b7c4fd58d5b84c.tar.xz
m + improve makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-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