xref: /dragonfly/contrib/lvm2/dist/man/Makefile (revision 9348a738)
1#
2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3# Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
4#
5# This file is part of LVM2.
6#
7# This copyrighted material is made available to anyone wishing to use,
8# modify, copy, or redistribute it subject to the terms and conditions
9# of the GNU General Public License v.2.
10#
11# You should have received a copy of the GNU General Public License
12# along with this program; if not, write to the Free Software Foundation,
13# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
14
15srcdir = .
16top_srcdir = ..
17top_builddir = ..
18
19
20ifeq ("", "yes")
21FSADMMAN = fsadm.8
22else
23FSADMMAN =
24endif
25
26MAN5=lvm.conf.5
27MAN8=lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 \
28	lvmchange.8 lvmdiskscan.8 lvmdump.8 \
29	lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \
30	lvscan.8 pvchange.8 pvck.8 pvcreate.8 pvdisplay.8 pvmove.8 pvremove.8 \
31	pvresize.8 pvs.8 pvscan.8 vgcfgbackup.8 vgcfgrestore.8 vgchange.8 \
32	vgck.8 vgcreate.8 vgconvert.8 vgdisplay.8 vgexport.8 vgextend.8 \
33	vgimport.8 vgimportclone.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 \
34	vgrename.8 vgs.8 vgscan.8 vgsplit.8 $(FSADMMAN)
35MAN8CLUSTER=clvmd.8
36MAN8DM=dmsetup.8
37MAN5DIR=${mandir}/man5
38MAN8DIR=${mandir}/man8
39
40CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN) $(MAN8DM)
41
42include ../make.tmpl
43
44ifneq ("none", "none")
45  install: install_cluster
46endif
47
48all: man
49
50.PHONY: man
51
52device-mapper: $(MAN8DM)
53
54man: $(MAN5) $(MAN8) $(MAN8CLUSTER)
55
56$(MAN5) $(MAN8) $(MAN8CLUSTER):	Makefile
57
58%: %.in
59	$(SED) -e "s/#VERSION#/$(LVM_VERSION)/" $< > $@
60
61install_lvm2:
62	@echo "Installing $(MAN8) in $(MAN8DIR)"
63	@for f in $(MAN8); \
64	do \
65	   $(RM) $(MAN8DIR)/$$f; \
66	   /usr/bin/install -c -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \
67	done
68
69	@echo "Installing $(MAN5) in $(MAN5DIR)"
70	@for f in $(MAN5); \
71	do \
72	   $(RM) $(MAN5DIR)/$$f; \
73	   /usr/bin/install -c -D $(OWNER) $(GROUP) -m 444 $$f $(MAN5DIR)/$$f; \
74	done
75
76install_cluster:
77	@echo "Installing $(MAN8CLUSTER) in $(MAN8DIR)"
78	@for f in $(MAN8CLUSTER); \
79	do \
80	   $(RM) $(MAN8DIR)/$$f; \
81	   /usr/bin/install -c -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \
82	done
83
84install_device-mapper:
85	@echo "Installing $(MAN8DM) in $(MAN8DIR)"
86	@for f in $(MAN8DM); \
87	do \
88	   $(RM) $(MAN8DIR)/$$f; \
89	   /usr/bin/install -c -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \
90	done
91
92install: install_lvm2 install_device-mapper
93