xref: /titanic_51/usr/src/cmd/fm/dicts/Makefile (revision 8e22821528b08c6dba4e8176351560f316f6d0de)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#ident	"%Z%%M%	%I%	%E% SMI"
26
27include ../../Makefile.cmd
28
29common_DCNAMES = \
30	DISK \
31	FMD \
32	NXGE \
33	SUNOS \
34	PCI \
35	PCIEX \
36	ZFS \
37	SCA500 \
38	SCA1000
39
40i386_DCNAMES = \
41	AMD
42
43sparc_DCNAMES = \
44	SCF \
45	SUN4 \
46	SUN4U \
47	SUN4V
48
49DCNAMES = \
50	$(common_DCNAMES) \
51	$($(MACH)_DCNAMES)
52
53ALLDCNAMES = \
54	$(common_DCNAMES) \
55	$(sparc_DCNAMES) \
56	$(i386_DCNAMES)
57
58DCFILES = $(DCNAMES:%=%.dict)
59POFILES = $(DCNAMES:%=%.po)
60MOFILES = $(DCNAMES:%=%.mo)
61
62ROOTDCDIR = $(ROOTLIB)/fm/dict
63ROOTLCDIR = $(ROOTLIB)/locale/C/LC_MESSAGES
64
65ROOTDCFILES = $(DCNAMES:%=$(ROOTDCDIR)/%.dict)
66ROOTPOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.po)
67ROOTMOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.mo)
68ROOTALLPOFILES = $(ALLDCNAMES:%=$(ROOTLCDIR)/%.po)
69
70FILEMODE = 0444
71$(ROOTALLPOFILES) := FILEMODE = 0644
72
73DICTCK = ../scripts/dictck
74DICTCKFLAGS = -b ../scripts/buildcode
75
76all: $(MOFILES)
77
78_msg: $(ROOTALLPOFILES)
79
80$(ROOTDCDIR):
81	$(INS.dir)
82
83$(ROOTLIB)/locale:
84	$(INS.dir)
85
86$(ROOTLIB)/locale/C: $(ROOTLIB)/locale
87	$(INS.dir)
88
89$(ROOTLCDIR): $(ROOTLIB)/locale/C
90	$(INS.dir)
91
92$(ROOTDCDIR)/%: %
93	$(INS.file)
94
95$(ROOTLCDIR)/%: %
96	$(INS.file)
97
98%.mo: %.po
99	msgfmt -s -o $@ $<
100
101lint:
102	@for name in $(DCNAMES); do\
103		$(DICTCK) $(DICTCKFLAGS) $$name.dict $$name.po;\
104	done
105
106clean install_h lint:
107
108clobber:
109	$(RM) $(MOFILES)
110
111install: all $(ROOTDCDIR) $(ROOTLCDIR) \
112	$(ROOTDCFILES) $(ROOTALLPOFILES) $(ROOTMOFILES)
113