[Stgt-devel] [PATCH 4/4] iscsi: Add documentation installation
FUJITA Tomonori
fujita.tomonori
Thu Jan 24 06:29:36 CET 2008
On Sun, 20 Jan 2008 14:56:00 +0200
Erez Zilber <erezz at voltaire.com> wrote:
> 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..67fe655 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/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]
I found that `make clean` removes your tgt-setup-lun script.
fujita at lily:~/tgt/usr$ make clean
rm -f *.[od] tgtd tgtadm ../scripts/tgt-setup-lun iscsi/*.[od] ibmvio/*.[od] fc/*.[od] fcoe/*.[od]
Here's a fix.
=
From: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
Subject: [PATCH] fix Makefile mess
- we should not remove scripts/tgt-setup-lun
- we need to create directories properly
Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
usr/Makefile | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/usr/Makefile b/usr/Makefile
index 9b31432..ec15934 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -55,7 +55,7 @@ CFLAGS += -g -O2 -Wall -Wstrict-prototypes -fPIC
LIBS += -lpthread
PROGRAMS += tgtd tgtadm
-PROGRAMS += ../scripts/tgt-setup-lun
+SCRIPTS += ../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
@@ -80,7 +80,8 @@ tgtadm: tgtadm.o
@$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
.PHONY: install
-install: $(PROGRAMS) install_doc
+install: $(PROGRAMS) $(SCRIPTS) install_doc
+ install -d $(DESTDIR)/usr/sbin
install -m 0755 $(PROGRAMS) $(DESTDIR)/usr/sbin
install_doc: $(MANPAGES)
--
1.5.3.4
More information about the stgt
mailing list