From 77b69aa724813e9f72c6ae8aca554ed1e22538d1 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 4 Nov 2008 17:25:32 +0000 Subject: [PATCH] make install_device-mapper --- daemons/dmeventd/Makefile.in | 2 ++ include/Makefile.in | 4 +++- libdm/Makefile.in | 2 ++ make.tmpl.in | 5 +++-- man/Makefile.in | 15 ++++++++++++--- tools/Makefile.in | 18 ++++++++++++++---- 6 files changed, 36 insertions(+), 10 deletions(-) diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in index 7a91d7784..2da086c65 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in @@ -61,6 +61,8 @@ endif install: $(INSTALL_TYPE) install_include install_dmeventd +install_device-mapper: install + install_include: $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper-event.h \ $(includedir)/libdevmapper-event.h diff --git a/include/Makefile.in b/include/Makefile.in index 6e52e70b3..2d86488a4 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -20,7 +20,7 @@ VPATH = @srcdir@ LN_S = @LN_S@ -.PHONY: clean distclean all install pofile install_cluster +.PHONY: clean distclean all install pofile install_cluster install_device-mapper all: .symlinks_created @@ -43,5 +43,7 @@ install: install_cluster: +install_device-mapper: + cflow: diff --git a/libdm/Makefile.in b/libdm/Makefile.in index a242510ca..43e1d927f 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -67,6 +67,8 @@ endif install: $(INSTALL_TYPE) install_include +install_device-mapper: install + install_include: $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.h \ $(includedir)/libdevmapper.h diff --git a/make.tmpl.in b/make.tmpl.in index 64378ff66..b269adf34 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -129,7 +129,8 @@ DEPS = $(top_srcdir)/make.tmpl $(top_srcdir)/VERSION Makefile $(INC_LNS) OBJECTS = $(SOURCES:%.c=%.o) POTFILES = $(SOURCES:%.c=%.pot) -.PHONY: all install install_cluster pofile distclean clean cflow device-mapper +.PHONY: all install install_cluster pofile distclean clean cflow device-mapper +.PHONY: install_device-mapper .PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean) .PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow) .PHONY: $(SUBDIRS.device-mapper) $(SUBDIRS.install-device-mapper) @@ -163,7 +164,7 @@ $(SUBDIRS.install): $(SUBDIRS) $(SUBDIRS.install_cluster): $(SUBDIRS) $(MAKE) -C $(@:.install_cluster=) install_cluster -$(SUBDIRS.install_device-mapper): $(SUBDIRS) +$(SUBDIRS.install_device-mapper): device-mapper $(MAKE) -C $(@:.install_device-mapper=) install_device-mapper $(SUBDIRS.clean): diff --git a/man/Makefile.in b/man/Makefile.in index 3cfd11f63..f1a34d742 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -32,10 +32,11 @@ MAN8=lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 \ vgimport.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 vgrename.8 \ vgs.8 vgscan.8 vgsplit.8 $(FSADMMAN) MAN8CLUSTER=clvmd.8 +MAN8DM=dmsetup.8 MAN5DIR=${mandir}/man5 MAN8DIR=${mandir}/man8 -CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN) dmsetup.8 +CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN) $(MAN8DM) include $(top_srcdir)/make.tmpl @@ -47,7 +48,7 @@ all: man .PHONY: man -device-mapper: dmsetup.8 +device-mapper: $(MAN8DM) man: $(MAN5) $(MAN8) $(MAN8CLUSTER) @@ -56,7 +57,7 @@ $(MAN5) $(MAN8) $(MAN8CLUSTER): Makefile %: %.in $(SED) -e "s/#VERSION#/$(LVM_VERSION)/" $< > $@ -install: +install: install_device-mapper @echo "Installing $(MAN8) in $(MAN8DIR)" @for f in $(MAN8); \ do \ @@ -78,3 +79,11 @@ install_cluster: $(RM) $(MAN8DIR)/$$f; \ @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \ done + +install_device-mapper: + @echo "Installing $(MAN8DM) in $(MAN8DIR)" + @for f in $(MAN8DM); \ + do \ + $(RM) $(MAN8DIR)/$$f; \ + @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \ + done diff --git a/tools/Makefile.in b/tools/Makefile.in index fea1dbb5c..5c2b5805f 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -66,12 +66,14 @@ TARGETS =\ .commands \ lvm -INSTALL_TARGETS = install_tools_dynamic +INSTALL_LVM_TARGETS = install_tools_dynamic +INSTALL_DMSETUP_TARGETS = install_dmsetup_dynamic INSTALL_CMDLIB_TARGETS = install_cmdlib_dynamic ifeq ("@STATIC_LINK@", "yes") TARGETS += lvm.static - INSTALL_TARGETS += install_tools_static + INSTALL_LVM_TARGETS += install_tools_static + INSTALL_DMSETUP_TARGETS += install_dmsetup_static INSTALL_CMDLIB_TARGETS += install_cmdlib_static endif @@ -84,7 +86,7 @@ CLEAN_TARGETS = liblvm2cmd.so liblvm2cmd.a liblvm2cmd-static.a lvm lvm.o \ ifeq ("@CMDLIB@", "yes") TARGETS += liblvm2cmd.so - INSTALL_TARGETS += $(INSTALL_CMDLIB_TARGETS) + INSTALL_LVM_TARGETS += $(INSTALL_CMDLIB_TARGETS) endif ifeq ("@DMEVENTD@", "yes") @@ -182,4 +184,12 @@ install_tools_static: lvm.static $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm.static \ $(staticdir)/lvm.static -install: $(INSTALL_TARGETS) +install_dmsetup_dynamic: dmsetup + $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$< + +install_dmsetup_static: dmsetup.static + $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$< + +install_device-mapper: $(INSTALL_DMSETUP_TARGETS) + +install: $(INSTALL_LVM_TARGETS) install_device-mapper