aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-13 20:54:48 +0200
committerMattias Andrée <maandree@kth.se>2017-10-13 20:54:48 +0200
commit06c6991d0c890522d44e8ed048935f29509df268 (patch)
tree5dacb2935eb104f3ddd1a473ab73ff3413a7b01c
parentImprove style and license (diff)
downloadalarm-06c6991d0c890522d44e8ed048935f29509df268.tar.gz
alarm-06c6991d0c890522d44e8ed048935f29509df268.tar.bz2
alarm-06c6991d0c890522d44e8ed048935f29509df268.tar.xz
Update install and uninstall rules
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--Makefile21
1 files changed, 10 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index cb907c3..761f3d1 100644
--- a/Makefile
+++ b/Makefile
@@ -18,19 +18,18 @@ check: alarm
{ ! wait $$a; } && { ! wait $$b; } && { wait $$c; }
install: alarm
- install -dm755 -- "$(DESTDIR)$(BINDIR)"
- install -m755 $^ -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
- install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
- install -m644 LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
- install -dm755 -- "$(DESTDIR)$(MAN1DIR)"
- install -m644 $< -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/alarm"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
+ cp -- alarm "$(DESTDIR)$(PREFIX)/bin/"
+ cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/alarm/"
+ cp -- alarm.1 "$(DESTDIR)$(MANPREFIX)/man1/"
uninstall:
- -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
- -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
- -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
- -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
- -rm -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+ -rm -- "$(DESTDIR)$(PREFIX)/bin/alarm"
+ -rm -- "$(DESTDIR)$(PREFIX)/share/licenses/alarm/LICENSE"
+ -rm -- "$(DESTDIR)$(MANPREFIX)/man1/alarm.1"
+ -rmdir -- "$(DESTDIR)$(PREFIX)/share/licenses/alarm"
clean:
-rm -r -- alarm *.o