xref: /titanic_41/usr/src/cmd/lvm/metassist/Makefile.targ (revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae)
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# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28# Suffixes for files that flag a particular check
29SUFFIX_LINT = .lint
30
31all       := TARGET = all
32install   := TARGET = install
33clean     := TARGET = clean
34clobber   := TARGET = clobber
35catalog   := TARGET = catalog
36check     := TARGET = check
37cstyle    := TARGET = cstyle
38hdrchk    := TARGET = hdrchk
39lint      := TARGET = lint
40
41.KEEP_STATE:
42
43all: ${SUBDIRS} ${OBJS} .WAIT ${PROG}
44
45# Create the binary
46$(PROG): $(OBJS) $(SUBOBJS)
47	$(LINK.c) $(OBJS) $(SUBOBJS) -o $@ $(LDLIBS)
48	$(POST_PROCESS)
49
50# Make objects in subdirectories
51$(SUBOBJS) $(POFILES):
52	@cd $(@D); ${MAKE} $(@F)
53
54ROOTXML=	$(ROOTSHLIB)/xml
55
56# Rule/definitions for DTDs
57ROOTXMLDTD=	$(ROOTXML)/dtd
58ROOTXMLDTDFILES=	$(DTDFILES:%=$(ROOTXMLDTD)/%)
59$(ROOTXMLDTDFILES) :=	OWNER = root
60$(ROOTXMLDTDFILES) :=	GROUP = sys
61$(ROOTXMLDTDFILES) :=	FILEMODE = 0444
62
63$(ROOTXMLDTD)/%: %
64	$(INS.file)
65
66# Rule/definitions for XSL style sheets
67ROOTXMLSTYLE=	$(ROOTXML)/style
68ROOTXMLSTYLEFILES=	$(STYLEFILES:%=$(ROOTXMLSTYLE)/%)
69$(ROOTXMLSTYLEFILES) :=	OWNER = root
70$(ROOTXMLSTYLEFILES) :=	GROUP = sys
71$(ROOTXMLSTYLEFILES) :=	FILEMODE = 0444
72
73$(ROOTXMLSTYLE)/%: %
74	$(INS.file)
75
76# Install recursively
77install: all .WAIT \
78	${SUBDIRS} \
79	$(ROOTUSRSBINPROG) \
80	$(ROOTETCDEFAULTFILES) \
81	$(ROOTXMLDTDFILES) \
82	$(ROOTXMLSTYLEFILES)
83
84# Pattern-matching rule for lint
85%$(SUFFIX_LINT): %
86	${LINT.c} -I. ${INCLUDES} -y -c $< && touch $@
87
88# Run lint on all source files
89lint: ${SUBDIRS} $(SRCS:%=%$(SUFFIX_LINT))
90
91CSTYLE_FLAGS=	-Pp
92HDRCHK_FLAGS=	-a
93
94cstyle: ${SUBDIRS}
95
96hdrchk: ${SUBDIRS}
97
98check: cstyle hdrchk
99
100clobber: ${SUBDIRS}
101
102clean: ${SUBDIRS}
103	-${RM} *.o *.ln *.i *~ core a.out $(CLEANFILES) \
104		*$(SUFFIX_LINT)
105
106catalog: $(POFILE)
107
108${SUBDIRS}: FRC
109	@cd $@; pwd; ${MAKE} ${TARGET}
110
111FRC:
112
113# Included for message catalog handling
114include $(SRC)/Makefile.msg.targ
115include $(METASSIST_TOPLEVEL)/../../Makefile.targ
116