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