diff options
author | obache <obache> | 2010-04-10 00:46:23 +0000 |
---|---|---|
committer | obache <obache> | 2010-04-10 00:46:23 +0000 |
commit | 68d1c2ce6f73aa9c94bdbff71dccaabe2d8f7f78 (patch) | |
tree | 67ce0fbd7968663013e6b32caf1d3b1f18cfad84 /mk/tools | |
parent | 2ff598377e5e51c1335a5f2fa944c514ae3033e4 (diff) | |
download | pkgsrc-68d1c2ce6f73aa9c94bdbff71dccaabe2d8f7f78.tar.gz |
strip \r in awk script, avoid to extra `tr' exec.
Diffstat (limited to 'mk/tools')
-rw-r--r-- | mk/tools/gettext.mk | 5 | ||||
-rw-r--r-- | mk/tools/msgfmt-msgctxt.awk | 3 | ||||
-rwxr-xr-x | mk/tools/msgfmt.sh | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/mk/tools/gettext.mk b/mk/tools/gettext.mk index ed373ecb7b2..971b17dab9d 100644 --- a/mk/tools/gettext.mk +++ b/mk/tools/gettext.mk @@ -1,4 +1,4 @@ -# $NetBSD: gettext.mk,v 1.13 2010/04/09 15:44:17 wiz Exp $ +# $NetBSD: gettext.mk,v 1.14 2010/04/10 00:46:23 obache Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -122,8 +122,7 @@ TOOLS_PATH.msgfmt= ${TOOLS_PREFIX.msgfmt}/bin/msgfmt . if !empty(_TOOLS_USE_MSGFMT_SH:M[yY][eE][sS]) USE_TOOLS+= awk sh TOOLS_SCRIPT.msgfmt= AWK=${TOOLS_AWK:Q} CAT=${TOOLS_CAT:Q} \ - TR=${TOOLS_TR:Q} \ - MSGFMT=${TOOLS_PATH.msgfmt:Q} \ + MSGFMT=${TOOLS_PATH.msgfmt:Q} \ PKGSRCDIR=${PKGSRCDIR:Q} \ MSGFMT_STRIP_MSGID_PLURAL=${MSGFMT_STRIP_MSGID_PLURAL} \ MSGFMT_STRIP_MSGCTXT=${MSGFMT_STRIP_MSGCTXT} \ diff --git a/mk/tools/msgfmt-msgctxt.awk b/mk/tools/msgfmt-msgctxt.awk index 271e6642972..f7cfee3e0eb 100644 --- a/mk/tools/msgfmt-msgctxt.awk +++ b/mk/tools/msgfmt-msgctxt.awk @@ -1,8 +1,9 @@ -# $NetBSD: msgfmt-msgctxt.awk,v 1.1 2009/03/20 16:13:02 joerg Exp $ +# $NetBSD: msgfmt-msgctxt.awk,v 1.2 2010/04/10 00:46:23 obache Exp $ # # Simple awk script to strip out .po entries with "msgctxt" or "#~|", so the # resultant file can be handled by the msgfmt 0.14.x. { +sub(/\r$/, "") if (/^$/) { entry_end(); } else if ($1 == "msgctxt" || $2 == "msgctxt") { skip = 1; } else if ($1 == "#~|") { skip = 1; } diff --git a/mk/tools/msgfmt.sh b/mk/tools/msgfmt.sh index 8c614d51dc5..5a2dc775553 100755 --- a/mk/tools/msgfmt.sh +++ b/mk/tools/msgfmt.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: msgfmt.sh,v 1.33 2010/04/09 15:44:17 wiz Exp $ +# $NetBSD: msgfmt.sh,v 1.34 2010/04/10 00:46:23 obache Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -84,7 +84,6 @@ : ${CAT=cat} : ${MSGFMT=/usr/bin/msgfmt} : ${TEE=tee} -: ${TR=tr} case "${MSGFMT}" in /*) ;; @@ -163,7 +162,6 @@ if test "$pofile" != "-" -a ! -e "$pofile"; then fi ${CAT} $pofile | \ -${TR} -d '\015' | \ if test "${MSGFMT_STRIP_MSGCTXT}" = "yes"; then ${AWK} -f ${PKGSRCDIR}/mk/tools/msgfmt-msgctxt.awk else |