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 65all := TARGET = all 66install := TARGET = install 67clean := TARGET = clean 68clobber := TARGET = clobber 69lint := TARGET = lint 70 71.KEEP_STATE: 72 73all clobber lint: $(SUBDIRS) 74 75$(MDPO): $(MSGFILES) 76 $(BUILDPO.msgfiles) 77 78$(POFILE): $(POFILES) 79 $(BUILDPO.pofiles) 80 81catalog: $(POFILE) 82 83check: $(CHKMANIFEST) 84 85clean: $(SUBDIRS) 86 $(RM) $(MSGFILES) 87 88install: $(SUBDIRS) $(ROOTMANIFEST) $(ROOTSVCMETHOD) 89 90$(SUBDIRS): FRC 91 @cd $@; pwd; $(MAKE) $(TARGET) 92 93FRC: 94 95include ../../Makefile.targ 96include $(SRC)/Makefile.msg.targ 97 98$(MDPO) := POFILE = $(MDPO) 99