xref: /netbsd-src/external/gpl2/lvm2/dist/man/Makefile.in (revision de4fa6c51a9708fc05f88b618fa6fad87c9508ec)
1#
2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3# Copyright (C) 2004-2008 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 = @srcdir@
16top_srcdir = @top_srcdir@
17VPATH = @srcdir@
18
19SUBDIRS = doc include man scripts
20
21ifeq ("@INTL@", "yes")
22  SUBDIRS += po
23endif
24
25SUBDIRS += lib tools daemons libdm
26
27ifeq ($(MAKECMDGOALS),distclean)
28  SUBDIRS += daemons/clvmd \
29	     daemons/dmeventd/plugins \
30	     lib/format1 \
31	     lib/format_pool \
32	     lib/locking \
33	     lib/mirror \
34	     lib/snapshot \
35	     test \
36	     po
37  DISTCLEAN_TARGETS += lib/misc/configure.h
38  DISTCLEAN_DIRS += lcov_reports*
39endif
40
41include make.tmpl
42
43libdm: include
44lib: libdm
45daemons: lib tools
46tools: lib device-mapper
47po: tools daemons
48
49libdm.device-mapper: include.device-mapper
50daemons.device-mapper: libdm.device-mapper
51tools.device-mapper: libdm.device-mapper
52device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
53
54ifeq ("@INTL@", "yes")
55lib.pofile: include.pofile
56tools.pofile: lib.pofile
57daemons.pofile: lib.pofile
58po.pofile: tools.pofile daemons.pofile
59pofile: po.pofile
60endif
61
62ifneq ("@CFLOW_CMD@", "")
63tools.cflow: lib.cflow
64cflow: tools.cflow
65endif
66
67ifneq ("@CSCOPE_CMD@", "")
68cscope.out: tools
69	@CSCOPE_CMD@ -b -R
70all: cscope.out
71endif
72
73check: all
74	$(MAKE) -C test all
75
76ifneq ("@LCOV@", "")
77.PHONY: lcov-reset lcov lcov-dated
78
79ifeq ($(MAKECMDGOALS),lcov-dated)
80LCOV_REPORTS_DIR=$(top_srcdir)/lcov_reports-$(shell date +%Y%m%d%k%M%S)
81else
82LCOV_REPORTS_DIR=$(top_srcdir)/lcov_reports
83endif
84
85lcov-reset:
86	$(LCOV) -d $(top_srcdir)/dmeventd --zerocounters
87	$(LCOV) -d $(top_srcdir)/libdm --zerocounters
88	$(LCOV) -d $(top_srcdir)/lib --zerocounters
89	$(LCOV) -d $(top_srcdir)/tools --zerocounters
90
91lcov: all
92	$(RM) -rf $(LCOV_REPORTS_DIR)
93	$(MKDIR_P) $(LCOV_REPORTS_DIR)
94	$(LCOV) -b ${top_srcdir}/libdm -d $(top_srcdir)/libdm -c -o $(LCOV_REPORTS_DIR)/libdm.info
95	$(LCOV) -b $(top_srcdir)/lib -d $(top_srcdir)/lib -c -o $(LCOV_REPORTS_DIR)/lib.info
96	$(LCOV) -b $(top_srcdir)/tools -d $(top_srcdir)/tools -c -o $(LCOV_REPORTS_DIR)/tools.info
97	DMEVENTD_INFO="$(LCOV_REPORTS_DIR)/dmeventd.info" ;\
98	DMEVENTD_INFO_A="-a $$DMEVENTDINFO" ;\
99	$(LCOV) -b $(top_srcdir)/dmeventd -d $(top_srcdir)/dmeventd -c -o $$DMEVENTD_INFO || DMEVENTD_INFO_A="" ;\
100	$(LCOV) $$DMEVENTD_INFO_A -a $(LCOV_REPORTS_DIR)/lib.info \
101		-a $(LCOV_REPORTS_DIR)/libdm.info \
102		-a $(LCOV_REPORTS_DIR)/tools.info \
103		-o $(LCOV_REPORTS_DIR)/lvm.info
104ifneq ("@GENHTML@", "")
105	$(GENHTML) -o $(LCOV_REPORTS_DIR) -p $(top_srcdir) $(LCOV_REPORTS_DIR)/lvm.info
106endif
107
108lcov-dated: lcov
109
110endif
111