xref: /titanic_41/usr/src/cmd/fm/dicts/Makefile (revision bd9d7d01f0d32a91d43d2004867fc442f5c3ef98)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27
28include ../../Makefile.cmd
29
30common_DCNAMES = \
31	FMD \
32	SMF \
33	SUNOS \
34	PCI \
35	ZFS \
36	SCA500 \
37	SCA1000
38
39sparc_DCNAMES = \
40	SUN4 \
41	SUN4U \
42	SUN4V
43
44DCNAMES = \
45	$(common_DCNAMES) \
46	$($(MACH)_DCNAMES)
47
48ALLDCNAMES = \
49	$(common_DCNAMES) \
50	$(sparc_DCNAMES)
51
52DCFILES = $(DCNAMES:%=%.dict)
53POFILES = $(DCNAMES:%=%.po)
54MOFILES = $(DCNAMES:%=%.mo)
55
56ROOTDCDIR = $(ROOTLIB)/fm/dict
57ROOTLCDIR = $(ROOTLIB)/locale/C/LC_MESSAGES
58
59ROOTDCFILES = $(DCNAMES:%=$(ROOTDCDIR)/%.dict)
60ROOTPOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.po)
61ROOTMOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.mo)
62ROOTALLPOFILES = $(ALLDCNAMES:%=$(ROOTLCDIR)/%.po)
63
64FILEMODE = 0444
65$(ROOTALLPOFILES) := FILEMODE = 0644
66
67DICTCK = ../scripts/dictck
68DICTCKFLAGS = -b ../scripts/buildcode
69
70all: $(MOFILES)
71
72_msg: $(ROOTALLPOFILES)
73
74$(ROOTDCDIR):
75	$(INS.dir)
76
77$(ROOTLIB)/locale:
78	$(INS.dir)
79
80$(ROOTLIB)/locale/C: $(ROOTLIB)/locale
81	$(INS.dir)
82
83$(ROOTLCDIR): $(ROOTLIB)/locale/C
84	$(INS.dir)
85
86$(ROOTDCDIR)/%: %
87	$(INS.file)
88
89$(ROOTLCDIR)/%: %
90	$(INS.file)
91
92%.mo: %.po
93	msgfmt -s -o $@ $<
94
95lint:
96	@for name in $(DCNAMES); do\
97		$(DICTCK) $(DICTCKFLAGS) $$name.dict $$name.po;\
98	done
99
100clean install_h lint:
101
102clobber:
103	$(RM) $(MOFILES)
104
105install: all $(ROOTDCDIR) $(ROOTLCDIR) \
106	$(ROOTDCFILES) $(ROOTALLPOFILES) $(ROOTMOFILES)
107