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