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