xref: /illumos-gate/usr/src/cmd/fm/dicts/Makefile (revision 4d9fdb46b215739778ebc12079842c9905586999)
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	NIC
43
44i386_DCNAMES = \
45	AMD \
46	INTEL \
47	GMCA
48
49sparc_DCNAMES = \
50	SCF \
51	SUN4 \
52	SUN4U \
53	SUN4V
54
55DCNAMES = \
56	$(common_DCNAMES) \
57	$($(MACH)_DCNAMES)
58
59ALLDCNAMES = \
60	$(common_DCNAMES) \
61	$(sparc_DCNAMES) \
62	$(i386_DCNAMES)
63
64DCFILES = $(DCNAMES:%=%.dict)
65POFILES = $(DCNAMES:%=%.po)
66MOFILES = $(DCNAMES:%=%.mo)
67
68ROOTDCDIR = $(ROOTLIB)/fm/dict
69ROOTLCDIR = $(ROOTLIB)/locale/C/LC_MESSAGES
70
71ROOTDCFILES = $(DCNAMES:%=$(ROOTDCDIR)/%.dict)
72ROOTPOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.po)
73ROOTMOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.mo)
74ROOTALLPOFILES = $(ALLDCNAMES:%=$(ROOTLCDIR)/%.po)
75
76FILEMODE = 0444
77$(ROOTALLPOFILES) := FILEMODE = 0644
78
79DICTCK = ../scripts/dictck
80DICTCKFLAGS = -b ../scripts/buildcode
81
82all: $(MOFILES)
83
84_msg: $(ROOTALLPOFILES)
85
86$(ROOTDCDIR):
87	$(INS.dir)
88
89$(ROOTLIB)/locale:
90	$(INS.dir)
91
92$(ROOTLIB)/locale/C: $(ROOTLIB)/locale
93	$(INS.dir)
94
95$(ROOTLCDIR): $(ROOTLIB)/locale/C
96	$(INS.dir)
97
98$(ROOTDCDIR)/%: %
99	$(INS.file)
100
101$(ROOTLCDIR)/%: %
102	$(INS.file)
103
104%.mo: %.po
105	$(MSGFMT) -o $@ $<
106
107lint:
108	@for name in $(DCNAMES); do\
109		$(DICTCK) $(DICTCKFLAGS) $$name.dict $$name.po;\
110	done
111
112clean install_h lint:
113
114clobber:
115	$(RM) $(MOFILES)
116
117install: all $(ROOTDCDIR) $(ROOTLCDIR) \
118	$(ROOTDCFILES) $(ROOTALLPOFILES) $(ROOTMOFILES)
119