xref: /titanic_41/usr/src/cmd/lvm/md_monitord/Makefile (revision ef2c19a1d5242688ccc42f46886fcc495f8e1141)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5a192e900Samaguire# Common Development and Distribution License (the "License").
6a192e900Samaguire# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
237c478bd9Sstevel@tonic-gate#
24a192e900Samaguire# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
257c478bd9Sstevel@tonic-gate# Use is subject to license terms.
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gate#
297c478bd9Sstevel@tonic-gate# Makefile for logical volume management
307c478bd9Sstevel@tonic-gate#
317c478bd9Sstevel@tonic-gate#
327c478bd9Sstevel@tonic-gate# cmd/lvm/md_monitord/Makefile
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gatePROG= mdmonitord
357c478bd9Sstevel@tonic-gateMANIFEST= mdmonitor.xml
36a192e900SamaguireSVCMETHOD= svc-mdmonitor
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
397c478bd9Sstevel@tonic-gateinclude ../Makefile.lvm
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateSUBDIRS=	$(MACH)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateSRCS=	probedev.c md_monitord.c
447c478bd9Sstevel@tonic-gate
45a192e900SamaguireCLOBBERFILES += $(SVCMETHOD)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gate#
48a192e900Samaguire# i18n: For catalog we need to put messages from $(SRCS) and $(SVCMETHOD).sh
49a192e900Samaguire# into "`basename $PWD`p.po" = md_monitordp.po = $(POFILE) (that's what
50a192e900Samaguire# ../Makefile expects).  We'll use $(BUILDPO.pofiles) to build $(POFILE) from
51a192e900Samaguire# $(MDPO) and $(SVCMETHODPO), and we'll use $(BUILDPO.msgfiles) to build
52a192e900Samaguire# $(MDPO) from $(SRCS).  The catch is that $(BUILDPO.msgfiles) is defined to
53a192e900Samaguire# produce $(POFILE).  Fortunately we can conditionally define POFILE = MDPO
54a192e900Samaguire# when building MDPO.  make complains when this conditional definition is
55a192e900Samaguire# before we include Makefile.msg.targ, so it must lie at the end.
567c478bd9Sstevel@tonic-gate#
577c478bd9Sstevel@tonic-gateMSGFILES= $(SRCS:%.c=%.i)
587c478bd9Sstevel@tonic-gateMDPO= $(PROG:%=%.po)
59a192e900SamaguireSVCMETHODPO= $(SVCMETHOD:%=%.po)
60a192e900SamaguirePOFILES= $(MDPO) $(SVCMETHODPO)
617c478bd9Sstevel@tonic-gatePOFILE= md_monitordp.po
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
647c478bd9Sstevel@tonic-gate
65*ef2c19a1Samaguire$(ROOTSVCMETHOD):	$(SVCMETHOD)
66*ef2c19a1Samaguire
677c478bd9Sstevel@tonic-gateall     :=      TARGET = all
687c478bd9Sstevel@tonic-gateinstall :=      TARGET = install
697c478bd9Sstevel@tonic-gateclean   :=      TARGET = clean
707c478bd9Sstevel@tonic-gateclobber :=      TARGET = clobber
717c478bd9Sstevel@tonic-gatelint    :=      TARGET = lint
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate.KEEP_STATE:
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateall clobber lint:    $(SUBDIRS)
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gate$(MDPO):	$(MSGFILES)
787c478bd9Sstevel@tonic-gate	$(BUILDPO.msgfiles)
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate$(POFILE):	$(POFILES)
817c478bd9Sstevel@tonic-gate	$(BUILDPO.pofiles)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gatecatalog:	$(POFILE)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gateclean: $(SUBDIRS)
887c478bd9Sstevel@tonic-gate	$(RM) $(MSGFILES)
897c478bd9Sstevel@tonic-gate
90a192e900Samaguireinstall:	$(SUBDIRS) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate$(SUBDIRS):	FRC
937c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gateFRC:
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
987c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.msg.targ
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gate$(MDPO) :=	POFILE = $(MDPO)
101