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