xref: /illumos-gate/usr/src/cmd/fm/dicts/Makefile (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26include ../../Makefile.cmd
27
28common_DCNAMES = \
29	DISK \
30	FMD \
31	NXGE \
32	SUNOS \
33	PCI \
34	PCIEX \
35	ZFS \
36	SCA500 \
37	SCA1000 \
38	SENSOR \
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