xref: /titanic_41/usr/src/cmd/lvm/etc/Makefile (revision dd49f125507979bb2ab505a8daf2a46d1be27051)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# Makefile for logical volume management
25#
26#
27# cmd/lvm/etc/Makefile
28
29
30include ../../Makefile.cmd
31include ../Makefile.lvm
32
33FLASHPRESRC= svm.save.sh
34FLASHPOSTSRC= svm.cleanup.sh
35FLASHPREPROG= $(FLASHPRESRC:%.sh=%)
36FLASHPOSTPROG= $(FLASHPOSTSRC:%.sh=%)
37LVMINITPROG= md.cf md.ctlrmap md.tab mddb.cf lock runtime.cf devpath
38#
39#
40
41all:=           TARGET= all
42install:=       TARGET= install
43clean:=         TARGET= clean
44clobber:=       TARGET= clobber
45lint:=          TARGET= lint
46
47ETCLVMD= $(ROOTETC)/lvm
48ETCFLASHD=	$(ROOTETC)/flash
49ETCFLASHPRED=	$(ROOTETC)/flash/predeployment
50ETCFLASHPOSTD=	$(ROOTETC)/flash/postdeployment
51
52DIRS=	$(ETCLVMD) $(ETCFLASHD) $(ETCFLASHPRED) $(ETCFLASHPOSTD)
53
54ETCLVMINITPROG= $(LVMINITPROG:%=$(ETCLVMD)/%)
55ETCFLASHPREPROG= $(FLASHPREPROG:%=$(ETCFLASHPRED)/%)
56ETCFLASHPOSTPROG= $(FLASHPOSTPROG:%=$(ETCFLASHPOSTD)/%)
57
58$(ETCLVMD) :=	DIRMODE=	755
59$(ETCFLASHD) :=	DIRMODE=	755
60$(ETCFLASHPRED) :=	DIRMODE=	755
61$(ETCFLASHPOSTD) :=	DIRMODE=	755
62$(ETCLVMINITPROG) :=	FILEMODE=       0644
63$(ETCFLASHPREPROG) :=	FILEMODE=       0744
64$(ETCFLASHPOSTPROG) :=	FILEMODE=       0744
65
66.KEEP_STATE:
67
68all: $(LVMINITPROG) $(FLASHPREPROG) $(FLASHPOSTPROG)
69
70install: all .WAIT $(DIRS) .WAIT $(ETCLVMINITPROG)
71
72install: all .WAIT $(DIRS) .WAIT $(ETCLVMINITPROG) \
73	$(ETCFLASHPREPROG) $(ETCFLASHPOSTPROG)
74
75cstyle:
76
77lint:
78
79$(DIRS):
80	$(INS.dir)
81
82$(ETCLVMD)/% : %
83	$(INS.file)
84
85$(ETCFLASHPRED)/% : %
86	$(INS.file)
87
88$(ETCFLASHPOSTD)/% : %
89	$(INS.file)
90
91clean:
92
93clobber: clean
94	$(RM) $(FLASHPREPROG) $(FLASHPOSTPROG)
95