Blob Blame History Raw
Makefile fixes

From: Michal Schmidt <mschmidt@redhat.com>

Fix the 'install' target:
 - Don't assume SBINDIR already exists under DESTDIR.
 - Install the manpage.

Index: latencytop-0.5/Makefile
===================================================================
--- latencytop-0.5.orig/Makefile
+++ latencytop-0.5/Makefile
@@ -3,6 +3,7 @@ HAS_GTK_GUI = 1
 
 DESTDIR =
 SBINDIR = /usr/sbin
+MANDIR  = /usr/share/man
 XCFLAGS = -W  -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
 LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
 
@@ -36,6 +37,9 @@ clean:
 
 install: latencytop
 	mkdir -p $(DESTDIR)/usr/share/latencytop
+	mkdir -p $(DESTDIR)$(MANDIR)/man8
+	mkdir -p $(DESTDIR)$(SBINDIR)
 	install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
 	install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
 	install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
+	install -m 0644 latencytop.8 $(DESTDIR)$(MANDIR)/man8/