17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*d29b2c44Sab196087# Common Development and Distribution License (the "License"). 6*d29b2c44Sab196087# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 227c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 237c478bd9Sstevel@tonic-gate# 24*d29b2c44Sab196087# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 25*d29b2c44Sab196087# Use is subject to license terms. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate# cmd/sgs/messages/Makefile.targ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateall: $(POFILE) 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.targ 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gatecatalog \ 347c478bd9Sstevel@tonic-gateinstall: $(MSGDOMAIN)/$(POFILE) 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate$(MSGDOMAIN)/$(POFILE): \ 377c478bd9Sstevel@tonic-gate $(MSGDOMAIN) $(POFILE) 387c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 397c478bd9Sstevel@tonic-gate cp $(POFILE) $(MSGDOMAIN) 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gatedelete lint: 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateclean: 447c478bd9Sstevel@tonic-gate $(RM) $(CLEANFILES) 457c478bd9Sstevel@tonic-gate 46*d29b2c44Sab196087# The elfedit modules message files need a special rule that runs 47*d29b2c44Sab196087# the elfedit catalog target. It generates module messages files 48*d29b2c44Sab196087# as part of that process. 49*d29b2c44Sab196087$(POFILES_ELFEDIT_MODULES) : 50*d29b2c44Sab196087 @ cd ../../elfedit; pwd; $(MAKE) catalog 51*d29b2c44Sab196087 52*d29b2c44Sab196087$(POFILE): $(POFILES) $(POFILES_ELFEDIT_MODULES) 537c478bd9Sstevel@tonic-gate $(RM) $(POFILE) 54*d29b2c44Sab196087 cat $(POFILES) $(POFILES_ELFEDIT_MODULES) > $(POFILE) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate# Install a local version of the message catalog. Test using: LANG=piglatin 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gatetest: $(MSGDIR)/$(TEST_MOFILE) 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gate$(MSGDIR)/$(TEST_MOFILE): \ 627c478bd9Sstevel@tonic-gate $(MSGDIR) $(TEST_MSGID) $(TEST_MSGSTR) 637c478bd9Sstevel@tonic-gate $(RM) $(MSGDIR)/$(TEXT_DOMAIN).mo 647c478bd9Sstevel@tonic-gate sort $(TEST_MSGID) $(TEST_MSGSTR) | \ 657c478bd9Sstevel@tonic-gate sed -e "s/ *[0-9]* //" > $(TEST_POFILE) 667c478bd9Sstevel@tonic-gate $(MSGFMT) -o $(MSGDIR)/$(TEST_MOFILE) $(TEST_POFILE) 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate$(TEST_MSGID): $(POFILE) 69*d29b2c44Sab196087 grep "^msgid" $(POFILE) | \ 70*d29b2c44Sab196087 $(SGSMSG_PIGLATIN_NL) 1 > $(TEST_MSGID) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate$(TEST_MSGSTR): $(POFILE) 737c478bd9Sstevel@tonic-gate cat $(POFILE) | $(SGSTOOLS)/$(MACH)/piglatin | \ 747c478bd9Sstevel@tonic-gate grep "^sgidmay" | sed -e "s/^sgidmay/msgstr/" | \ 75*d29b2c44Sab196087 $(SGSMSG_PIGLATIN_NL) 2 > $(TEST_MSGSTR) 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate$(MSGDIR): 787c478bd9Sstevel@tonic-gate -@mkdir -p $(MSGDIR) 79