[14/14] batctl: Install manpage

Message ID 1305980898-30494-14-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit 772f14bd4709d0a92a1ffbb07580d1a3c91e3c11
Headers

Commit Message

Sven Eckelmann May 21, 2011, 12:28 p.m. UTC
  Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
  

Comments

Marek Lindner May 22, 2011, 10:12 a.m. UTC | #1
On Saturday 21 May 2011 14:28:18 Sven Eckelmann wrote:
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
>  Makefile |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)

Applied in revision 772f14b.

Thanks,
Marek
  

Patch

diff --git a/Makefile b/Makefile
index 7ac72ed..eee5a63 100755
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@ 
 # batctl build
 BINARY_NAME = batctl
 OBJ = main.o bat-hosts.o functions.o sys.o debug.o ping.o traceroute.o tcpdump.o list-batman.o hash.o vis.o debugfs.o bisect.o
+MANPAGE = man/batctl.8
 
 # batctl flags and options
 CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
@@ -48,6 +49,7 @@  LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
 # standard install paths
 PREFIX = /usr/local
 SBINDIR = $(PREFIX)/sbin
+MANDIR = $(PREFIX)/share/man
 
 # try to generate revision
 REVISION = $(shell if [ -d .git ]; then echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); fi)
@@ -69,7 +71,9 @@  clean:
 
 install: $(BINARY_NAME)
 	$(MKDIR) $(DESTDIR)$(SBINDIR)
+	$(MKDIR) $(DESTDIR)$(MANDIR)/man8
 	$(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR)
+	$(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8
 
 # load dependencies
 DEP = $(OBJ:.o=.d)