From owner-svn-src-user@FreeBSD.ORG Wed Oct 7 21:00:01 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E66961065672; Wed, 7 Oct 2009 21:00:01 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89A88FC08; Wed, 7 Oct 2009 21:00:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n97L01kR099256; Wed, 7 Oct 2009 21:00:01 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n97L007b099247; Wed, 7 Oct 2009 21:00:00 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200910072100.n97L007b099247@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 7 Oct 2009 21:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197844 - user/edwin/locale/share X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 21:00:02 -0000 Author: edwin Date: Wed Oct 7 20:59:59 2009 New Revision: 197844 URL: http://svn.freebsd.org/changeset/base/197844 Log: Add an target for the maintainers to compare the MD5 checksums of the UTF-8 files and to compare them with the MD5 checksums of the files created by the CMS_xxx variables (should be different) and with the MD5 checksums of the files created by the CMSLINK_xx variables (should be the same). Modified: user/edwin/locale/share/Makefile.def.inc Modified: user/edwin/locale/share/Makefile.def.inc ============================================================================== --- user/edwin/locale/share/Makefile.def.inc Wed Oct 7 20:56:15 2009 (r197843) +++ user/edwin/locale/share/Makefile.def.inc Wed Oct 7 20:59:59 2009 (r197844) @@ -255,6 +255,13 @@ ICONV_${ccln}.${cms}= ${ICONV} . endif . endfor . endif +. if defined(CMSLINK_${ccln}) +. for cms in ${CMSLINK_${ccln}} +. if !defined(ICONV_${ccln}.${cms}) +ICONV_${ccln}.${cms}= ${ICONV} +. endif +. endfor +. endif .endfor .for cm in ${CMS} @@ -305,7 +312,6 @@ ${ccln}.UTF-8.src: ${ccln}.unicode --cldr=${CLDRDIR} \ --input=${.ALLSRC} \ --output=${.TARGET} - . endif ${ccln}.UTF-8.out: ${ccln}.UTF-8.src @@ -360,4 +366,62 @@ beforeinstall: shift; \ done +.if defined(FULL) +# +# Maintainer Bag of Tricks +# +# Perform the following checks: +# - Create all files defined with CCLN and (CMS_xx and CMSLINK_xx) +# - See if all MD5 checksums for CMS_{ccln} are different. +# - See if all MD5 checksums for CMSLINK_{ccln} are the same. +# +checkcms: +. for ccln in ${CCLN} + ../../usr.bin/unicode2utf8/unicode2utf8 \ + --cldr=${CLDRDIR} \ + --input=${ccln}.unicode \ + --output=${ccln}.UTF-8.src + grep -v '^#' < ${ccln}.UTF-8.src > ${ccln}.UTF-8.out +. for cms in ${CMS_${ccln}} ${CMSLINK_${ccln}} + cat ${ccln}.UTF-8.src \ + ${_TRANSLATIONBEFORE_${cms}} | \ + ${ICONV_${ccln}.${cms}} \ + -f UTF-8 \ + -t ${CMALIAS_${cms}} \ + ${_TRANSLATIONAFTER_${cms}} \ + > ${ccln}.${cms}.src \ + || rm ${ccln}.${cms}.src && exit 0 + grep -v '^#' < ${ccln}.${cms}.src > ${ccln}.${cms}.out +. endfor +. endfor + md5 -r *.out > /tmp/a + FULL=1 ${MAKE} checkcms1 + +. for ccln in ${CCLN} +. for cms in UTF-8 ${CMS_${ccln}} ${CMSLINK_${ccln}} +MD5SUM_${ccln}.${cms}!= grep ${ccln}.${cms}.out /tmp/a | awk '{ print $$1 }' +. endfor +. endfor + +# +# Perform the following checks: +# - See if all MD5 checksums for CMS_{ccln} are different. +# - See if all MD5 checksums for CMSLINK_{ccln} are the same. +# +checkcms1: +. for ccln in ${CCLN} +. for cms in ${CMS_${ccln}} + @if [ ${MD5SUM_${ccln}.${cms}} = ${MD5SUM_${ccln}.UTF-8} ]; then \ + echo Same: ${ccln}.UTF-8 - ${ccln}.${cms}; \ + fi +. endfor +. for cms in ${CMSLINK_${ccln}} + @if [ ${MD5SUM_${ccln}.${cms}} != ${MD5SUM_${ccln}.UTF-8} ]; then \ + echo Different: ${ccln}.UTF-8 - ${ccln}.${cms}; \ + fi +. endfor +. endfor + +.endif + .include