pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk On the sed expression used to extract $NetBSD$ and ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dd307caacf68
branches:  trunk
changeset: 530218:dd307caacf68
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Tue Jun 19 13:11:01 2007 +0000

description:
On the sed expression used to extract $NetBSD$ and $Id$ tags, add
a "^" to the beginning to anchor the expression.  No change in the ouput
but on SunOS-5.9 it runs up to 90,000 times faster on some files (probably
much less of an improvement on some, maybe more improvement on others).
Committed during the freeze as bulk builds that call 'make debug' were
unusable.

diffstat:

 mk/bsd.pkg.debug.mk |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 0d18cca798b1 -r dd307caacf68 mk/bsd.pkg.debug.mk
--- a/mk/bsd.pkg.debug.mk       Tue Jun 19 09:39:10 2007 +0000
+++ b/mk/bsd.pkg.debug.mk       Tue Jun 19 13:11:01 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.debug.mk,v 1.18 2007/06/06 12:43:04 rillig Exp $
+# $NetBSD: bsd.pkg.debug.mk,v 1.19 2007/06/19 13:11:01 dmcmahill Exp $
 #
 # Public targets:
 #
@@ -43,12 +43,12 @@
 _show-dbginfo-file-versions:
        @${PRINTF} "File versions:\\n"
        ${_PKG_SILENT}${_PKG_DEBUG} set -e;                             \
-       sedexpr='s,.*\([$$]NetBSD:[^$$]*\$$\).*,\1,p';                  \
+       sedexpr='s,^.*\([$$]NetBSD:[^$$]*\$$\).*,\1,p';                 \
        ${FIND} * -type f -print                                        \
        | while read fname; do                                          \
          ident=`${SED} -n                                              \
-           -e 's,.*\\([$$]NetBSD:[^$$]*\\$$\\).*,\\1,p'                \
-           -e 's,.*\\([$$]Id:[^$$]*\\$$\\).*,\\1,p'                    \
+           -e 's,^.*\\([$$]NetBSD:[^$$]*\\$$\\).*,\\1,p'               \
+           -e 's,^.*\\([$$]Id:[^$$]*\\$$\\).*,\\1,p'                   \
            "$${fname}"` || continue;                                   \
          case $${ident} in                                             \
          *?*) ${PRINTF} "\\t%s: %s\\n" "$${fname}" "$${ident}";;       \



Home | Main Index | Thread Index | Old Index