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.
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.
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]
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # cmd/sgs/messages/Makefile.targ
29 include $(SRC)/cmd/Makefile.targ
32 install: $(MSGDOMAIN)/$(POFILE)
34 $(MSGDOMAIN)/$(POFILE): \
35 $(MSGDOMAIN) $(POFILE)
36 $(RM) $(MSGDOMAIN)/$(POFILE)
37 cp $(POFILE) $(MSGDOMAIN)
44 # The elfedit modules message files need a special rule that runs
45 # the elfedit catalog target. It generates module messages files
46 # as part of that process.
47 $(POFILES_ELFEDIT_MODULES) :
48 @ cd ../../elfedit; pwd; $(MAKE) catalog
50 $(POFILE): $(POFILES) $(POFILES_ELFEDIT_MODULES)
52 cat $(POFILES) $(POFILES_ELFEDIT_MODULES) > $(POFILE)
55 # Install a local version of the message catalog. Test using: LANG=piglatin
57 test: $(MSGDIR)/$(TEST_MOFILE)
59 $(MSGDIR)/$(TEST_MOFILE): \
60 $(MSGDIR) $(TEST_MSGID) $(TEST_MSGSTR)
61 $(RM) $(MSGDIR)/$(TEXT_DOMAIN).mo
62 sort -n $(TEST_MSGID) $(TEST_MSGSTR) | \
63 sed -e "s/ *[0-9]* //" > $(TEST_POFILE)
64 $(MSGFMT) -o $(MSGDIR)/$(TEST_MOFILE) $(TEST_POFILE)
66 $(TEST_MSGID): $(POFILE)
67 grep "^msgid" $(POFILE) | \
68 $(SGSMSG_PIGLATIN_NL) 1 > $(TEST_MSGID)
70 $(TEST_MSGSTR): $(POFILE)
71 cat $(POFILE) | $(SGSTOOLS)/$(MACH)/piglatin | \
72 grep "^sgidmay" | sed -e "s/^sgidmay/msgstr/" | \
73 $(SGSMSG_PIGLATIN_NL) 2 > $(TEST_MSGSTR)