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