commit 8a5ccabcf57f5832ec0acf8ec1a76b8615deefaf
parent a2e2700d5032f2e180b7a0b8bde1319719dd4dab
Author: Balduin Dettling <balduindettling@gmail.com>
Date: Tue, 27 Dec 2016 23:16:37 +0100
Makefile installs/uninstalls man page
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -3,6 +3,9 @@ SRC = diary.c
PREFIX ?= /usr/local
BINDIR ?= $(DESTDIR)$(PREFIX)/bin
+MANDIR := $(PREFIX)/share/man
+MAN1 = diary.1
+
CC = gcc
CFLAGS = -Wall
UNAME = ${shell uname}
@@ -30,6 +33,10 @@ clean:
install: $(TARGET)
cp $(TARGET) $(BINDIR)/$(TARGET)
+ mkdir -p $(MANDIR)/man1
+ cp -f $(MAN1) $(MANDIR)/man1
+ chmod 644 $(MANDIR)/man1/$(MAN1)
uninstall:
rm -f $(BINDIR)/$(TARGET)
+ rm -f $(MANDIR)/man1/$(MAN1)