10eb822a1Scindi# 20eb822a1Scindi# CDDL HEADER START 30eb822a1Scindi# 40eb822a1Scindi# The contents of this file are subject to the terms of the 50eb822a1Scindi# Common Development and Distribution License (the "License"). 60eb822a1Scindi# You may not use this file except in compliance with the License. 70eb822a1Scindi# 80eb822a1Scindi# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90eb822a1Scindi# or http://www.opensolaris.org/os/licensing. 100eb822a1Scindi# See the License for the specific language governing permissions 110eb822a1Scindi# and limitations under the License. 120eb822a1Scindi# 130eb822a1Scindi# When distributing Covered Code, include this CDDL HEADER in each 140eb822a1Scindi# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150eb822a1Scindi# If applicable, add the following below this CDDL HEADER, with the 160eb822a1Scindi# fields enclosed by brackets "[]" replaced with your own identifying 170eb822a1Scindi# information: Portions Copyright [yyyy] [name of copyright owner] 180eb822a1Scindi# 190eb822a1Scindi# CDDL HEADER END 200eb822a1Scindi# 210eb822a1Scindi 220eb822a1Scindi# 23940d71d2Seschrock# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 240eb822a1Scindi# Use is subject to license terms. 25*1410cb93SJoshua M. Clulow# Copyright (c) 2013, Joyent, Inc. All rights reserved. 260eb822a1Scindi# 270eb822a1Scindi 280eb822a1Scindi.KEEP_STATE: 29184cd04cScth.SUFFIXES: 30*1410cb93SJoshua M. Clulow.SUFFIXES: .xml .xmlgen .xmlgenksh $(SUFFIXES) 310eb822a1Scindi 320eb822a1ScindiMODCLASS = maps 330eb822a1Scindi 340eb822a1Scindiinclude ../../../Makefile.lib 350eb822a1Scindiinclude ../../../../Makefile.lib 360eb822a1Scindi 370eb822a1ScindiDTDSRC = $(DTDFILE:%=../common/%) 380eb822a1ScindiDTDTARG = $(DTDFILE:%=%) 390eb822a1ScindiROOTDTDTARG = $(DTDTARG:%=$(ROOT)/usr/share/lib/xml/dtd/%) 400eb822a1Scindi 410eb822a1Scindicommon_ROOTTOPOROOT = $(ROOT)/usr/lib/fm/topo/$(MODCLASS) 420eb822a1Scindiarch_ROOTTOPOROOT = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/$(MODCLASS) 430eb822a1Scindiplatform_ROOTTOPOROOT = \ 440eb822a1Scindi $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/$(MODCLASS)) 450eb822a1ScindiROOTTOPOROOT = $($(CLASS)_ROOTTOPOROOT) 460eb822a1ScindiROOTTOPOMAPS = $(TOPOFILE:%=$(ROOTTOPOROOT)/%) 470eb822a1Scindi 480eb822a1Scindiinstall:= FILEMODE = 0444 490eb822a1Scindi 50d91236feSeschrock# The .xmlgen perl file automatically generates a new xml file. This is done 51d91236feSeschrock# to avoid having to deal with things like 48 platform specific internal 52d91236feSeschrock# storage bays by hand. 53184cd04cScth.xmlgen.xml: 54184cd04cScth $(RM) $@ 55d91236feSeschrock $(CAT) ../common/xmlgen-header.xml > $@ 56d91236feSeschrock $(PERL) $< >> $@ 57184cd04cScth 58*1410cb93SJoshua M. Clulow.xmlgenksh.xml: 59*1410cb93SJoshua M. Clulow $(RM) $@ 60*1410cb93SJoshua M. Clulow $(CAT) ../common/xmlgen-header-new.xml > $@ 61*1410cb93SJoshua M. Clulow $(KSH93) $< >> $@ 62*1410cb93SJoshua M. Clulow 63ee5416c9Syc148097%.xml: ../common/%.xml 640eb822a1Scindi $(RM) $@ 650eb822a1Scindi $(CAT) $< > $@ 660eb822a1Scindi 670eb822a1Scindiinclude ../../Makefile.rootdirs 680eb822a1Scindi 690eb822a1Scindiall: $(TOPOFILE) 700eb822a1Scindi 710eb822a1Scindiclean: 720eb822a1Scindi $(RM) $(ROOTTOPOMAPS) 73ee5416c9Syc148097 $(RM) $(TEMPTOPOFILE) 740eb822a1Scindi 750eb822a1Scindiclobber: clean 76b6805bf7SGordon Ross $(RM) $(CLOBBERFILES) 770eb822a1Scindi 780eb822a1Scindicheck: $(CHECKHDRS) 790eb822a1Scindi 80940d71d2Seschrockinstall_h _msg: 81940d71d2Seschrock 82940d71d2Seschrocklint: $(TOPOFILE:%=%.chk) 83940d71d2Seschrock 84940d71d2Seschrock%.xml.chk: %.xml 85940d71d2Seschrock @echo xmllint $< 86940d71d2Seschrock @xmllint --dropdtd $< | \ 87940d71d2Seschrock xmllint --noout --dtdvalid $(DTDSRC) - 880eb822a1Scindi 890eb822a1Scindi$($(CLASS)_ROOTTOPOROOT)/%: % 900eb822a1Scindi $(INS.file) 910eb822a1Scindi 920eb822a1Scindi$(ROOTDTDTARG): $$(@D) 930eb822a1Scindi $(RM) $@; $(INS) -s -m 0444 -f $(@D) $(DTDSRC) 940eb822a1Scindi 950eb822a1Scindiinstall: all $(ROOTDTDTARG) $(ROOTTOPOROOT) $(ROOTTOPOMAPS) 96