2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A
2N/A.KEEP_STATE:
2N/A.SUFFIXES:
2N/A.SUFFIXES: .xml .xmlgen $(SUFFIXES)
2N/A
2N/AMODCLASS = maps
2N/A
2N/Ainclude ../../../Makefile.lib
2N/Ainclude ../../../../Makefile.lib
2N/A
2N/ADTDSRC = $(DTDFILE:%=../common/%)
2N/ADTDTARG = $(DTDFILE:%=%)
2N/AROOTDTDTARG = $(DTDTARG:%=$(ROOT)/usr/share/lib/xml/dtd/%)
2N/A
2N/Acommon_ROOTTOPOROOT = $(ROOT)/usr/lib/fm/topo/$(MODCLASS)
2N/Aarch_ROOTTOPOROOT = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/$(MODCLASS)
2N/Aplatform_ROOTTOPOROOT = \
2N/A $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/$(MODCLASS))
2N/AROOTTOPOROOT = $($(CLASS)_ROOTTOPOROOT)
2N/AROOTTOPOMAPS = $(TOPOFILE:%=$(ROOTTOPOROOT)/%) $(BAYMAPFILE:%=$(ROOTTOPOROOT)/%)
2N/A
2N/Ainstall:= FILEMODE = 0444
2N/A
2N/A# The .xmlgen perl file automatically generates a new xml file. This is done
2N/A# to avoid having to deal with things like 48 platform specific internal
2N/A# storage bays by hand.
2N/A.xmlgen.xml:
2N/A $(RM) $@
2N/A $(CAT) ../common/xmlgen-header.xml > $@
2N/A $(PERL) $< >> $@
2N/A
2N/A%.xml: ../common/%.xml
2N/A $(RM) $@
2N/A $(CAT) $< > $@
2N/A
2N/Ainclude ../../Makefile.rootdirs
2N/A
2N/Aall: $(TOPOFILE) $(BAYMAPFILE)
2N/A
2N/Aclean:
2N/A $(RM) $(ROOTTOPOMAPS)
2N/A $(RM) $(TEMPTOPOFILE)
2N/A
2N/Aclobber: clean
2N/A
2N/Acheck: $(CHECKHDRS)
2N/A
2N/Ainstall_h _msg:
2N/A
2N/Alint: $(TOPOFILE:%=%.chk)
2N/A
2N/A%.xml.chk: %.xml
2N/A @echo xmllint $<
2N/A @xmllint --dropdtd $< | \
2N/A xmllint --noout --dtdvalid $(DTDSRC) -
2N/A
2N/A$($(CLASS)_ROOTTOPOROOT)/%: %
2N/A $(INS.file)
2N/A
2N/A$(ROOTDTDTARG): $$(@D)
2N/A $(RM) $@; $(INS) -s -m 0444 -f $(@D) $(DTDSRC)
2N/A
2N/Ainstall: all $(ROOTDTDTARG) $(ROOTTOPOROOT) $(ROOTTOPOMAPS)