messages/Makefile.trans
author asano
Fri, 26 Aug 2011 10:51:14 +0900
changeset 194 ecd02baa4dc8
parent 168 25a9bdbf6b2e
permissions -rw-r--r--
7083117 gui-install and sysconfig localization update for Solaris 11 (based on b172 Engilsh)

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at $(SRC)/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at $(SRC)/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#

include $(SRC)/Makefile.master

#ROOT =		/proto
#SRC =		/usr/src

#FILEROOT=	$(ROOT)
TRANS_REL=	messages
TRANS=		$(SRC)/$(TRANS_REL)

LOCALE_PLACEHOLDER=	__LOCALE__

# These are default language setting
TARG_LANGUAGE:sh=	echo ${TARG_LANGUAGE-'cs_CZ de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh_CN zh_TW'}
TARG_LANGUAGE_S:sh=	echo ${TARG_LANGUAGES_S-'cs de es fr it ja ko sv zh zh_TW'}

cs_CZ_LOCALE :sh = 	echo ${cs_CZ_LOCALE-'cs_CZ.ISO8859-2 cs_CZ.UTF-8'}
de_DE_LOCALE :sh = 	echo ${de_DE_LOCALE-'de_DE.ISO8859-1 de_DE.UTF-8'}
es_ES_LOCALE :sh = 	echo ${es_ES_LOCALE-'es_ES.ISO8859-1 es_ES.UTF-8'}
fr_FR_LOCALE :sh = 	echo ${fr_FR_LOCALE-'fr_FR.ISO8859-1 fr_FR.UTF-8'}
it_IT_LOCALE :sh = 	echo ${it_IT_LOCALE-'it_IT.ISO8859-1 it_IT.UTF-8'}
ja_JP_LOCALE :sh = 	echo ${ja_JP_LOCALE-'ja_JP.eucJP ja_JP.PCK ja_JP.UTF-8'}
ko_KR_LOCALE :sh = 	echo ${ko_KR_LOCALE-'ko_KR.EUC ko_KR.UTF-8'}
pl_PL_LOCALE :sh = 	echo ${pl_PL_LOCALE-'pl_PL.ISO8859-2 pl_PL.UTF-8'}
pt_BR_LOCALE :sh = 	echo ${pt_BR_LOCALE-'pt_BR.ISO8859-1 pt_BR.UTF-8'}
ru_RU_LOCALE :sh = 	echo ${ru_RU_LOCALE-'ru_RU.UTF-8 ru_RU.KOI8-R ru_RU.ISO8859-5 ru_RU.ANSI1251'}
sv_SE_LOCALE :sh = 	echo ${sv_SE_LOCALE-'sv_SE.ISO8859-1 sv_SE.UTF-8'}
zh_CN_LOCALE :sh = 	echo ${zh_CN_LOCALE-'zh_CN.EUC zh_CN.GBK zh_CN.UTF-8'}
zh_TW_LOCALE :sh = 	echo ${zh_TW_LOCALE-'zh_TW.EUC zh_TW.UTF-8 zh_TW.BIG5'}

TARG_LOCALE= \
	$(cs_CZ_LOCALE) \
	$(de_DE_LOCALE) \
	$(es_ES_LOCALE) \
	$(fr_FR_LOCALE) \
	$(it_IT_LOCALE) \
	$(ja_JP_LOCALE) \
	$(ko_KR_LOCALE) \
	$(sv_SE_LOCALE) \
	$(zh_CN_LOCALE) \
	$(zh_TW_LOCALE)

# Common macro used in each Makefile.
ECHO=		echo
INS=		/usr/sbin/install
SYMLINK=	/usr/bin/ln -s
CHMOD=		/usr/bin/chmod
CHOWN=		$(ECHO)
CHGRP=		$(ECHO)
MV=		/usr/bin/mv -f
RM=		/usr/bin/rm -f
CAT=		/usr/bin/cat
CP=		/usr/bin/cp -f 
MKDIR=		/usr/bin/mkdir -p
SED=		/usr/bin/sed
GREP=		/usr/bin/grep

# MACH must be set in the shell environment per uname -p on the build host
# More specific architecture variables should be set in lower makefiles.
#
MACH :sh= echo ${MACH-`uname -p`}

# For message compiler
MSGFMT_RAW=	/usr/bin/msgfmt
MSGFMT=		env LC_ALL=$(LOCALE) $(MSGFMT_RAW)
GENCAT=		env LC_ALL=$(LOCALE) /usr/bin/gencat
MKMSGS=         env LC_ALL=$(LOCALE) /usr/bin/mkmsgs

JAVAC=		env LC_ALL=$(LOCALE) /usr/bin/javac
JAR=		env LC_ALL=$(LOCALE) /usr/bin/jar -cf
JAVA_HOME=	/usr/java

# code conversion
ICONV_RAW=	/usr/bin/iconv
ICONV=		$(ICONV_RAW) -f UTF-8 -t $(CHARSET)
$(USEICV)ICONV= /usr/bin/cat
NATIVE2ASCII=	/usr/java/bin/native2ascii -encoding UTF8
CST_CONV_TO_EUC=	$(SED) -e '/^<meta http-equiv/s/charset=UTF-8/charset=$(CHARSET_HTML_EUC)/'
CLASSLOC_CONV=	$(SED) -e '/^public class/s/___LOCALE__ /_$(JAVA_LOCALE_S) /'
POUND_SIGN:sh=	echo \\043
STRIPCOMMENT_POUND=	$(GREP) -v "^$(POUND_SIGN)"

# For install
FILEMODE=       644
DIRMODE=        755

INS.file=       $(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $<
INS.dir=        $(INS) -s -d -m $(DIRMODE) $@
INS.rename=     $(INS.file); $(MV) $(@D)/$(<F) $@

# For packaging
PKGMK=		pkgmk -o -d $(PKGROOT) -r $(FILEROOT)
PKGFILES=	pkginfo prototype

#
# SRC_FILES, FILES, CLEAN_FILES and ROOT_FILES are used in bottom Makefile
# for actuial build. So Makefile.trans must be included target files
# macro like POFILES is defined.
#

SRC_FILES= \
	$(POFILES) \
	$(POTFILES) \
	$(MSGFILES) \
	$(ONMSGFILES) \
	$(MKMSGSFILES) \
	$(JAVAPROPS) \
	$(JAVAFILES) \
	$(TEXTFILES) \
	$(TEXTFILES_STRIPCOMMENT) \
	$(HTMLFILES)

CLEAN_FILES= \
	$(POFILES:%.po=%.mo) \
	$(POTFILES:%.pot=%.mo) \
	$(MSGFILES:%.msg=%.cat) \
	$(ONMSGFILES:%.msg=%) \
	$(MKMSGSFILES:%.src=%) \
	$(JAVAFILES:%.java=%.class) \
	$(JARFILE)
		
FILES=\
	$(POFILES:%.po=%.mo) \
	$(POTFILES:%.pot=%.mo) \
	$(MSGFILES:%.msg=%.cat) \
	$(ONMSGFILES:%.msg=%) \
	$(MKMSGSFILES:%.src=%) \
	$(JAVAPROPS) \
	$(JAVAFILES:%.java=%.class) \
	$(TEXTFILES) \
	$(TEXTFILES_STRIPCOMMENT) \
	$(HTMLFILES) \
	$(JARFILE)

ROOT_DIR_XX:sh=		pwd | sed -e 's:.*/messages/[^/][^/]*/makefiles/::'

ROOT_DIR_XX_PARENT:sh=	cd ..; pwd | sed -e 's:.*/messages/[^/][^/]*/makefiles/::'

ROOT_DIR=		$(FILEROOT)/$(ROOT_DIR_XX)

ROOT_DIR_PARENT=	$(FILEROOT)/$(ROOT_DIR_XX_PARENT)

ROOT_FILES =	$(FILES:%=$(ROOT_DIR)/%)