1 #! /usr/bin/ksh 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the License). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/CDDL.txt 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/CDDL.txt. 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 # 24 #ident "@(#)parse_i18n_proto.ksh 1.9 08/06/09 SMI" 25 # 26 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 27 # Use is subject to license terms. 28 # 29 30 CLOSED_MSG_CATALOGS=$* 31 32 nawk -v closed_msg_catalogs="${CLOSED_MSG_CATALOGS}" ' 33 BEGIN { 34 printf("include ../Makefile.com\n\n"); 35 } 36 /^f / { 37 if (NF == 6) { 38 path = $3; 39 mode = $4; 40 owner = $5; 41 group = $6; 42 n = split(path, paths, "/"); 43 split(paths[n], domain, ".po"); 44 catalogs[domain[1]] = 1; 45 printf("%s := CATPATH = %s\n", domain[1], path); 46 } 47 } 48 END { 49 printf("MSG_CATALOGS = "); 50 for (catalog in catalogs) { 51 if (! match(closed_msg_catalogs, catalog)) { 52 printf("\t%s", catalog); 53 } 54 else { 55 closed_catalogs[catalog] = 1; 56 } 57 } 58 printf("\n\n$(CLOSED_BUILD)MSG_CATALOGS += "); 59 for (catalog in closed_catalogs) { 60 printf("\t%s", catalog); 61 } 62 printf("\n\n_msg: $(MSG_CATALOGS)\n\ninclude ../Makefile.targ\n"); 63 }' 64