svn commit: r196774 - in user/edwin/locale/share: . msgdef
Edwin Groothuis
edwin at FreeBSD.org
Wed Sep 2 22:12:32 UTC 2009
Author: edwin
Date: Wed Sep 2 22:12:31 2009
New Revision: 196774
URL: http://svn.freebsd.org/changeset/base/196774
Log:
Be able to use libiconv/bsdiconv aliases which don't match the
"original" FreeBSD charactermaps (for example, macdevanaga with
ISCII-DEV) without having to keep the old names.
Modified:
user/edwin/locale/share/Makefile.def.inc
user/edwin/locale/share/msgdef/Makefile
Modified: user/edwin/locale/share/Makefile.def.inc
==============================================================================
--- user/edwin/locale/share/Makefile.def.inc Wed Sep 2 20:50:39 2009 (r196773)
+++ user/edwin/locale/share/Makefile.def.inc Wed Sep 2 22:12:31 2009 (r196774)
@@ -1,7 +1,18 @@
# $FreeBSD: user/edwin/locale/share/msgdef/Makefile 196760 2009-09-02 10:12:13Z edwin $
#
-# All variables
+# Predefined variables - Not for "end-users" to look at.
+#
+
+# aliases for charactermaps
+CMALIAS_ISCII-DEV= macdevanaga
+
+# libiconv doesn't understand iscii-dev, bsdiconv does
+ICONV= /home/edwin/libiconv/bin/iconv
+ICONV_hi_IN.ISCII-DEV= /usr/bin/iconv
+
+#
+# Calculated variables
#
# All charactermaps
@@ -120,10 +131,24 @@ SYMLINKS+= ../${ccln}.${cm}/${LCTYPE} ${
. endif
. endfor
+#
+# Fill in the ICONV_ variables with the default values.
+#
+. if defined(CMS_${ccln})
+. for cms in ${CMS_${ccln}}
+. if !defined(ICONV_${ccln}.${cms})
+ICONV_${ccln}.${cms}= ${ICONV}
+. endif
+. endfor
+. endif
+
.endfor
-ICONV= /home/edwin/libiconv/bin/iconv
-ICONV_hi_IN.macdevanaga= /usr/bin/iconv
+.for cm in ${CMS}
+. if !defined(CMALIAS_${cm})
+CMALIAS_${cm}= ${cm}
+. endif
+.endfor
#
# All targets
@@ -147,20 +172,14 @@ ${ccln}.UTF-8.out: ${ccln}.src
. if defined(CMS_${ccln})
. for cms in ${CMS_${ccln}}
+
${ccln}.${cms}.out: ${ccln}.src
-. if defined(ICONV_${ccln}.${cms})
${ICONV_${ccln}.${cms}} \
-f UTF-8 \
- -t ${cms} \
+ -t ${CMALIAS_${cms}} \
${.ALLSRC} > ${.TARGET} \
|| rm ${.TARGET} && exit 0
-. else
- ${ICONV} \
- -f UTF-8 \
- -t ${cms} \
- ${.ALLSRC} > ${.TARGET} \
- || rm ${.TARGET} && exit 0
-. endif
+
. endfor
. endif
.endfor
Modified: user/edwin/locale/share/msgdef/Makefile
==============================================================================
--- user/edwin/locale/share/msgdef/Makefile Wed Sep 2 20:50:39 2009 (r196773)
+++ user/edwin/locale/share/msgdef/Makefile Wed Sep 2 22:12:31 2009 (r196774)
@@ -13,7 +13,7 @@ CCLN= af_ZA am_ET be_BY bg_BG
CMS_be_BY= CP1131 CP1251 ISO8859-5
CMS_bg_BG= CP1251
CMS_el_GR= ISO8859-7
-CMS_hi_IN= macdevanaga
+CMS_hi_IN= ISCII-DEV
CMS_hy_AM= ARMSCII-8
CMS_ja_JP= SJIS eucJP
CMS_kk_KZ= PT154
@@ -79,15 +79,17 @@ LEGLINK_zh_Hant_TW= zh_TW zh_HK
LEGLINK_sr_Cyrl_RS= sr_YU
LEGLINK_sr_Latn_RS.ISO8859-2= sr_YU.ISO8859-2
LEGLINK_zh_Hans_CN.GBK2312= zh_CN.GBK
-LEGLINK_hi_IN.macdevanaga= hi_IN.ISCII-DEV
#
# In theory there are no parts after here which should be touched when adding
# or removing locales and charactermaps.
#
-LOCALEDIR= /usr/share/locale
+# Required variables
LCTYPE= LC_MESSAGES
+LOCALEDIR= /usr/share/locale
+
+# For testing only
DESTDIR= /home/edwin/locale/new/
SHAREOWN= edwin
SHAREGRP= edwin
@@ -96,5 +98,5 @@ SHAREGRP= edwin
# All variables
#
-.include "../Makefile.def.in"
+.include "../Makefile.def.inc"
.include <bsd.prog.mk>
More information about the svn-src-user
mailing list