1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Utilize FILES and SYMLINKS, other simplifications.

This commit is contained in:
Ruslan Ermilov 2004-10-16 19:51:34 +00:00
parent df103a1515
commit 495eba5429
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136596

View File

@ -1,8 +1,4 @@
# $FreeBSD$
#
NOMAN=YES
CLEANFILES+= ${LOCALES:S/$/.out/g}
LOCALES= bg_BG.CP1251 \
be_BY.CP1131 \
@ -41,108 +37,70 @@ LOCALES= bg_BG.CP1251 \
uk_UA.ISO8859-5 \
uk_UA.KOI8-U
LOCALEDIR= ${DESTDIR}/usr/share/locale
ASCIILINKS= am_ET.UTF-8 en_AU.US-ASCII en_CA.US-ASCII en_GB.US-ASCII \
en_NZ.US-ASCII en_US.US-ASCII ko_KR.CP949 ko_KR.eucKR \
ja_JP.eucJP ja_JP.SJIS tr_TR.ISO8859-9 zh_CN.eucCN \
zh_CN.GB18030 zh_CN.GB2312 zh_CN.GBK zh_HK.Big5HKSCS
DELINKS= de_AT de_CH
ZHLINKS= zh_TW.Big5
LATIN1LINKS= af_ZA da_DK en_AU en_CA en_GB en_NZ en_US eu_ES fi_FI \
fr_BE fr_CA fr_CH fr_FR it_CH it_IT nl_BE nl_NL no_NO \
pt_PT
LATIN2LINKS= hr_HR hu_HU ro_RO sr_YU
UTF8LINKS= af_ZA be_BY bg_BG ca_ES cs_CZ da_DK de_AT de_CH de_DE el_GR \
en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES fi_FI \
fr_BE \
fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \
ja_JP kk_KZ ko_KR lt_LT nl_BE nl_NL no_NO pl_PL pt_BR pt_PT \
ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \
zh_TW
LOCALEDIR= /usr/share/locale
.SUFFIXES: .src .out
.src.out:
colldef -I ${.CURDIR} -o ${.TARGET} ${.IMPSRC}
all: ${LOCALES:S/$/.out/g}
FILES= ${LOCALES:S/$/.out/}
FILESNAME= LC_COLLATE
be_BY.CP1131.out: map.CP1131
be_BY.CP1251.out: map.CP1251
be_BY.ISO8859-5.out: map.ISO8859-5
bg_BG.CP1251.out: map.CP1251
ca_ES.ISO8859-15.out: map.ISO8859-15
ca_ES.ISO8859-1.out: map.ISO8859-1
cs_CZ.ISO8859-2.out: map.ISO8859-2
de_DE.ISO8859-15.out: map.ISO8859-15
de_DE.ISO8859-1.out: map.ISO8859-1
el_GR.ISO8859-7.out: map.ISO8859-7
es_ES.ISO8859-15.out: map.ISO8859-15
es_ES.ISO8859-1.out: map.ISO8859-1
et_EE.ISO8859-15.out: map.ISO8859-15
hi_IN.ISCII-DEV.out: map.ISCII-DEV
hy_AM.ARMSCII-8.out: map.ARMSCII-8
is_IS.ISO8859-15.out: map.ISO8859-15
is_IS.ISO8859-1.out: map.ISO8859-1
kk_KZ.PT154.out: map.PT154
la_LN.ISO8859-15.out: map.ISO8859-15
la_LN.ISO8859-1.out: map.ISO8859-1
la_LN.ISO8859-2.out: map.ISO8859-2
la_LN.ISO8859-4.out: map.ISO8859-4
lt_LT.ISO8859-4.out: map.ISO8859-4
lt_LT.ISO8859-13.out: map.ISO8859-13
pl_PL.ISO8859-2.out: map.ISO8859-2
ru_RU.CP1251.out: map.CP1251
ru_RU.CP866.out: map.CP866
ru_RU.ISO8859-5.out: map.ISO8859-5
ru_RU.KOI8-R.out: map.KOI8-R
sl_SI.ISO8859-2.out: map.ISO8859-2
sr_YU.ISO8859-5.out: map.ISO8859-5
sv_SE.ISO8859-15.out: map.ISO8859-15
sv_SE.ISO8859-1.out: map.ISO8859-1
uk_UA.ISO8859-5.out: map.ISO8859-5
uk_UA.KOI8-U.out: map.KOI8-U
afterinstall:
.for locale in ${LOCALES}
${INSTALL} -m 644 -o ${BINOWN} -g ${BINGRP} \
${locale}.out ${LOCALEDIR}/${locale}/LC_COLLATE
FILESDIR_${locale}.out= ${LOCALEDIR}/${locale}
.if exists(${.CURDIR}/map.${locale:E})
${locale}.out: map.${locale:E}
.endif
.endfor
.for link in ${ASCIILINKS}
ln -fs ../la_LN.US-ASCII/LC_COLLATE \
${LOCALEDIR}/${link}/LC_COLLATE
CLEANFILES= ${FILES}
ENCODINGS= Big5 Big5HKSCS CP949 eucCN eucJP eucKR GB18030 GB2312 GBK \
ISO8859-1 ISO8859-2 ISO8859-9 ISO8859-15 SJIS US-ASCII UTF-8
ISO8859-1_Big5= is_IS:zh_TW
ISO8859-1_ISO8859-1= ${ISO8859-15_ISO8859-15} pt_PT:pt_BR
LATIN1LINKS= af_ZA da_DK en_AU en_CA en_GB en_NZ en_US eu_ES fi_FI \
fr_BE fr_CA fr_CH fr_FR it_CH it_IT nl_BE nl_NL no_NO \
pt_PT
ISO8859-15_ISO8859-15= de_DE:de_AT de_DE:de_CH ${LATIN1LINKS:C/^/la_LN:/}
LATIN2LINKS= hr_HR hu_HU ro_RO sr_YU
ISO8859-2_ISO8859-2= ${LATIN2LINKS:C/^/la_LN:/} cs_CZ:sk_SK
US-ASCII_Big5HKSCS= la_LN:zh_HK
US-ASCII_CP949= la_LN:ko_KR
US-ASCII_eucCN= la_LN:zh_CN
US-ASCII_eucJP= la_LN:ja_JP
US-ASCII_eucKR= la_LN:ko_KR
US-ASCII_GB18030= la_LN:zh_CN
US-ASCII_GB2312= la_LN:zh_CN
US-ASCII_GBK= la_LN:zh_CN
US-ASCII_ISO8859-9= la_LN:tr_TR
US-ASCII_SJIS= la_LN:ja_JP
ASCIILINKS= en_AU en_CA en_GB en_NZ en_US
US-ASCII_US-ASCII= ${ASCIILINKS:C/^/la_LN:/}
UTF8LINKS= af_ZA am_ET be_BY bg_BG ca_ES cs_CZ da_DK de_AT de_CH \
de_DE el_GR en_AU en_CA en_GB en_IE en_NZ en_US es_ES \
et_EE eu_ES fi_FI fr_BE \
fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \
ja_JP kk_KZ ko_KR lt_LT nl_BE nl_NL no_NO pl_PL pt_BR pt_PT \
ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \
zh_TW
US-ASCII_UTF-8= ${UTF8LINKS:C/^/la_LN:/}
SYMLINKS=
.for enc1 in ${ENCODINGS}
.for enc2 in ${ENCODINGS}
.for lang_terr in ${${enc1}_${enc2}}
SYMLINKS+= ../${lang_terr:C/:.*$//}.${enc1}/${FILESNAME} \
${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}
.endfor
.for link in ${ZHLINKS}
ln -fs ../is_IS.ISO8859-1/LC_COLLATE \
${LOCALEDIR}/${link}/LC_COLLATE
.endfor
.for link in ${LATIN1LINKS}
ln -fs ../la_LN.ISO8859-1/LC_COLLATE \
${LOCALEDIR}/${link}.ISO8859-1/LC_COLLATE
ln -fs ../la_LN.ISO8859-15/LC_COLLATE \
${LOCALEDIR}/${link}.ISO8859-15/LC_COLLATE
.endfor
.for link in ${LATIN2LINKS}
ln -fs ../la_LN.ISO8859-2/LC_COLLATE \
${LOCALEDIR}/${link}.ISO8859-2/LC_COLLATE
.endfor
.for link in ${DELINKS}
ln -fs ../de_DE.ISO8859-1/LC_COLLATE \
${LOCALEDIR}/${link}.ISO8859-1/LC_COLLATE
ln -fs ../de_DE.ISO8859-15/LC_COLLATE \
${LOCALEDIR}/${link}.ISO8859-15/LC_COLLATE
.endfor
ln -fs ../cs_CZ.ISO8859-2/LC_COLLATE \
${LOCALEDIR}/sk_SK.ISO8859-2/LC_COLLATE
ln -fs ../pt_PT.ISO8859-1/LC_COLLATE \
${LOCALEDIR}/pt_BR.ISO8859-1/LC_COLLATE
.for link in ${UTF8LINKS}
ln -fs ../la_LN.US-ASCII/LC_COLLATE \
${LOCALEDIR}/${link}.UTF-8/LC_COLLATE
.endfor
.include <bsd.prog.mk>