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