Makefile revision 9622934a862fa39a8e90c816c4136e293d75629d
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# fields enclosed by brackets "[]" replaced with your own identifying
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use is subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# ident "%Z%%M% %I% %E% SMI"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# For testing message catalogs
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User# We define our own definition for _msg here because most of these
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User# commands have the same PROG names as their counterparts in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# cmd/lp. Using the _msg rule defined in Makefile.cmd would
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# result in clobbering the cmd/lp message files.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# To get around this we will define one message file "print.po"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# for these commands (except java printmgr). To build
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# this file we find all of the .c files and run xgettext on them.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Then concatenate this with the scripts.po file.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(XGETTEXT) -s `/bin/find . -type d -name SCCS -prune -o -type f -name '*.c' -print`
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Create a message file to test with.
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User $(XGETTEXT) -s -m "xxx" `/bin/find . -print | grep '\.c$$' | sed '/SCCS/d'`
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User echo 'domain "SUNW_OST_OSCMD"' > SUNW_OST_OSCMD.po