10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 55088Sab196087# Common Development and Distribution License (the "License"). 65088Sab196087# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*8388SRod.Evans@Sun.COM# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 235088Sab196087# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# cmd/sgs/messages/Makefile.targ 260Sstevel@tonic-gate 270Sstevel@tonic-gateall: $(POFILE) 280Sstevel@tonic-gate 290Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.targ 300Sstevel@tonic-gate 310Sstevel@tonic-gatecatalog \ 320Sstevel@tonic-gateinstall: $(MSGDOMAIN)/$(POFILE) 330Sstevel@tonic-gate 340Sstevel@tonic-gate$(MSGDOMAIN)/$(POFILE): \ 350Sstevel@tonic-gate $(MSGDOMAIN) $(POFILE) 360Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 370Sstevel@tonic-gate cp $(POFILE) $(MSGDOMAIN) 380Sstevel@tonic-gate 390Sstevel@tonic-gatedelete lint: 400Sstevel@tonic-gate 410Sstevel@tonic-gateclean: 420Sstevel@tonic-gate $(RM) $(CLEANFILES) 430Sstevel@tonic-gate 445088Sab196087# The elfedit modules message files need a special rule that runs 455088Sab196087# the elfedit catalog target. It generates module messages files 465088Sab196087# as part of that process. 475088Sab196087$(POFILES_ELFEDIT_MODULES) : 485088Sab196087 @ cd ../../elfedit; pwd; $(MAKE) catalog 495088Sab196087 505088Sab196087$(POFILE): $(POFILES) $(POFILES_ELFEDIT_MODULES) 510Sstevel@tonic-gate $(RM) $(POFILE) 525088Sab196087 cat $(POFILES) $(POFILES_ELFEDIT_MODULES) > $(POFILE) 530Sstevel@tonic-gate 540Sstevel@tonic-gate 550Sstevel@tonic-gate# Install a local version of the message catalog. Test using: LANG=piglatin 560Sstevel@tonic-gate 570Sstevel@tonic-gatetest: $(MSGDIR)/$(TEST_MOFILE) 580Sstevel@tonic-gate 590Sstevel@tonic-gate$(MSGDIR)/$(TEST_MOFILE): \ 600Sstevel@tonic-gate $(MSGDIR) $(TEST_MSGID) $(TEST_MSGSTR) 610Sstevel@tonic-gate $(RM) $(MSGDIR)/$(TEXT_DOMAIN).mo 62*8388SRod.Evans@Sun.COM sort -n $(TEST_MSGID) $(TEST_MSGSTR) | \ 630Sstevel@tonic-gate sed -e "s/ *[0-9]* //" > $(TEST_POFILE) 640Sstevel@tonic-gate $(MSGFMT) -o $(MSGDIR)/$(TEST_MOFILE) $(TEST_POFILE) 650Sstevel@tonic-gate 660Sstevel@tonic-gate$(TEST_MSGID): $(POFILE) 675088Sab196087 grep "^msgid" $(POFILE) | \ 685088Sab196087 $(SGSMSG_PIGLATIN_NL) 1 > $(TEST_MSGID) 690Sstevel@tonic-gate 700Sstevel@tonic-gate$(TEST_MSGSTR): $(POFILE) 710Sstevel@tonic-gate cat $(POFILE) | $(SGSTOOLS)/$(MACH)/piglatin | \ 720Sstevel@tonic-gate grep "^sgidmay" | sed -e "s/^sgidmay/msgstr/" | \ 735088Sab196087 $(SGSMSG_PIGLATIN_NL) 2 > $(TEST_MSGSTR) 740Sstevel@tonic-gate 750Sstevel@tonic-gate$(MSGDIR): 760Sstevel@tonic-gate -@mkdir -p $(MSGDIR) 77