[Stgt-devel] [PATCH 4/4 v2] iscsi: Add documentation installation

Erez Zilber erezz
Mon Jan 21 14:11:35 CET 2008


Here's a fixed patch that installs man pages from doc/manpages.

Install documentation as part of running 'make install'.

Signed-off-by: Erez Zilber <erezz at voltaire.com>
---
 usr/Makefile |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index 0c02277..9b31432 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,3 +1,5 @@
+mandir = /usr/share/man
+
 ifneq ($(IBMVIO),)
 CFLAGS += -DIBMVIO -DUSE_KERNEL
 TGTD_OBJS += $(addprefix ibmvio/, ibmvio.o)
@@ -56,6 +58,7 @@ PROGRAMS += tgtd tgtadm
 PROGRAMS += ../scripts/tgt-setup-lun
 TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
 		parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o bs.o
+MANPAGES = ../doc/manpages/tgtadm.8 ../doc/manpages/tgt-setup-lun.8
 
 TGTD_DEP = $(TGTD_OBJS:.o=.d)
 
@@ -77,9 +80,13 @@ tgtadm: tgtadm.o
 	@$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
 
 .PHONY: install
-install: $(PROGRAMS)
+install: $(PROGRAMS) install_doc
 	install -m 0755 $(PROGRAMS) $(DESTDIR)/usr/sbin
 
+install_doc: $(MANPAGES)
+	install -d $(DESTDIR)$(mandir)/man8
+	install -m 644 $^ $(DESTDIR)$(mandir)/man8
+
 .PHONY: clean
 clean:
 	rm -f *.[od] $(PROGRAMS) iscsi/*.[od] ibmvio/*.[od] fc/*.[od] fcoe/*.[od]
-- 
1.5.3.7





More information about the stgt mailing list