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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 23# 24 25include ../../Makefile.cmd 26 27common_DCNAMES = \ 28 DISK \ 29 FMD \ 30 FMNOTIFY \ 31 NXGE \ 32 SMF \ 33 SUNOS \ 34 PCI \ 35 PCIEX \ 36 ZFS \ 37 SCA500 \ 38 SCA1000 \ 39 SENSOR \ 40 STORAGE \ 41 TEST 42 43i386_DCNAMES = \ 44 AMD \ 45 INTEL \ 46 GMCA 47 48sparc_DCNAMES = \ 49 SCF \ 50 SUN4 \ 51 SUN4U \ 52 SUN4V 53 54DCNAMES = \ 55 $(common_DCNAMES) \ 56 $($(MACH)_DCNAMES) 57 58ALLDCNAMES = \ 59 $(common_DCNAMES) \ 60 $(sparc_DCNAMES) \ 61 $(i386_DCNAMES) 62 63DCFILES = $(DCNAMES:%=%.dict) 64POFILES = $(DCNAMES:%=%.po) 65MOFILES = $(DCNAMES:%=%.mo) 66 67ROOTDCDIR = $(ROOTLIB)/fm/dict 68ROOTLCDIR = $(ROOTLIB)/locale/C/LC_MESSAGES 69 70ROOTDCFILES = $(DCNAMES:%=$(ROOTDCDIR)/%.dict) 71ROOTPOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.po) 72ROOTMOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.mo) 73ROOTALLPOFILES = $(ALLDCNAMES:%=$(ROOTLCDIR)/%.po) 74 75FILEMODE = 0444 76$(ROOTALLPOFILES) := FILEMODE = 0644 77 78DICTCK = ../scripts/dictck 79DICTCKFLAGS = -b ../scripts/buildcode 80 81all: $(MOFILES) 82 83_msg: $(ROOTALLPOFILES) 84 85$(ROOTDCDIR): 86 $(INS.dir) 87 88$(ROOTLIB)/locale: 89 $(INS.dir) 90 91$(ROOTLIB)/locale/C: $(ROOTLIB)/locale 92 $(INS.dir) 93 94$(ROOTLCDIR): $(ROOTLIB)/locale/C 95 $(INS.dir) 96 97$(ROOTDCDIR)/%: % 98 $(INS.file) 99 100$(ROOTLCDIR)/%: % 101 $(INS.file) 102 103%.mo: %.po 104 $(MSGFMT) -o $@ $< 105 106lint: 107 @for name in $(DCNAMES); do\ 108 $(DICTCK) $(DICTCKFLAGS) $$name.dict $$name.po;\ 109 done 110 111clean install_h lint: 112 113clobber: 114 $(RM) $(MOFILES) 115 116install: all $(ROOTDCDIR) $(ROOTLCDIR) \ 117 $(ROOTDCFILES) $(ROOTALLPOFILES) $(ROOTMOFILES) 118