xref: /titanic_41/usr/src/cmd/fm/dicts/Makefile (revision 5aefb6555731130ca4fd295960123d71f2d21fe8)
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 2006 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
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