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