xref: /titanic_50/usr/src/lib/fm/topo/maps/Makefile.map (revision 3fbbb872ea33adea240e8fd8c692f6d3131cc69b)
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#
23# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27
28.KEEP_STATE:
29.SUFFIXES:
30.SUFFIXES: .xml .xmlgen $(SUFFIXES)
31
32MODCLASS = maps
33
34include ../../../Makefile.lib
35include ../../../../Makefile.lib
36
37DTDSRC = $(DTDFILE:%=../common/%)
38DTDTARG = $(DTDFILE:%=%)
39ROOTDTDTARG = $(DTDTARG:%=$(ROOT)/usr/share/lib/xml/dtd/%)
40
41common_ROOTTOPOROOT = $(ROOT)/usr/lib/fm/topo/$(MODCLASS)
42arch_ROOTTOPOROOT = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/$(MODCLASS)
43platform_ROOTTOPOROOT = \
44	$(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/$(MODCLASS))
45ROOTTOPOROOT = $($(CLASS)_ROOTTOPOROOT)
46ROOTTOPOMAPS = $(TOPOFILE:%=$(ROOTTOPOROOT)/%)
47
48install:= FILEMODE =	0444
49
50# The .xmlgen perl file merges the platform specific xml code with the
51# base $TOPOBASE xml file and generates a new xml file. This is
52# done to avoid having to deal with things like 48 platform specific
53# internal storage bays by hand.
54.xmlgen.xml:
55	$(RM) $@
56	$(PERL) $< -p $(PLATFORM) -i $(TOPOBASE) -o $@
57
58%.xml: ../common/%.xml
59	$(RM) $@
60	$(CAT) $< > $@
61
62include ../../Makefile.rootdirs
63
64all: $(TOPOFILE)
65
66clean:
67	$(RM) $(ROOTTOPOMAPS)
68	$(RM) $(TEMPTOPOFILE)
69
70clobber: clean
71
72check: $(CHECKHDRS)
73
74install_h lint _msg:
75
76$($(CLASS)_ROOTTOPOROOT)/%: %
77	$(INS.file)
78
79$(ROOTDTDTARG): $$(@D)
80	$(RM) $@; $(INS) -s -m 0444 -f $(@D) $(DTDSRC)
81
82install: all $(ROOTDTDTARG) $(ROOTTOPOROOT) $(ROOTTOPOMAPS)
83