xref: /titanic_41/usr/src/cmd/lvm/md_monitord/Makefile (revision d4660949aa62dd6a963f4913b7120b383cf473c4)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22#pragma ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27
28#
29# Makefile for logical volume management
30#
31#
32# cmd/lvm/md_monitord/Makefile
33
34PROG= mdmonitord
35MANIFEST= mdmonitor.xml
36SVCMETHOD= svc-mdmonitor
37
38include ../../Makefile.cmd
39include ../Makefile.lvm
40
41SUBDIRS=	$(MACH)
42
43SRCS=	probedev.c md_monitord.c
44
45CLOBBERFILES += $(SVCMETHOD)
46
47#
48# i18n: For catalog we need to put messages from $(SRCS) and $(SVCMETHOD).sh
49# into "`basename $PWD`p.po" = md_monitordp.po = $(POFILE) (that's what
50# ../Makefile expects).  We'll use $(BUILDPO.pofiles) to build $(POFILE) from
51# $(MDPO) and $(SVCMETHODPO), and we'll use $(BUILDPO.msgfiles) to build
52# $(MDPO) from $(SRCS).  The catch is that $(BUILDPO.msgfiles) is defined to
53# produce $(POFILE).  Fortunately we can conditionally define POFILE = MDPO
54# when building MDPO.  make complains when this conditional definition is
55# before we include Makefile.msg.targ, so it must lie at the end.
56#
57MSGFILES= $(SRCS:%.c=%.i)
58MDPO= $(PROG:%=%.po)
59SVCMETHODPO= $(SVCMETHOD:%=%.po)
60POFILES= $(MDPO) $(SVCMETHODPO)
61POFILE= md_monitordp.po
62
63ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
64
65$(ROOTSVCMETHOD):	$(SVCMETHOD)
66
67all     :=      TARGET = all
68install :=      TARGET = install
69clean   :=      TARGET = clean
70clobber :=      TARGET = clobber
71lint    :=      TARGET = lint
72
73.KEEP_STATE:
74
75all clobber lint:    $(SUBDIRS)
76
77$(MDPO):	$(MSGFILES)
78	$(BUILDPO.msgfiles)
79
80$(POFILE):	$(POFILES)
81	$(BUILDPO.pofiles)
82
83catalog:	$(POFILE)
84
85check:	$(CHKMANIFEST)
86
87clean: $(SUBDIRS)
88	$(RM) $(MSGFILES)
89
90install:	$(SUBDIRS) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
91
92$(SUBDIRS):	FRC
93	@cd $@; pwd; $(MAKE) $(TARGET)
94
95FRC:
96
97include ../../Makefile.targ
98include $(SRC)/Makefile.msg.targ
99
100$(MDPO) :=	POFILE = $(MDPO)
101