pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/check Use a single egrep and regexp instead of iter...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b0039a1ad518
branches: trunk
changeset: 650955:b0039a1ad518
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Wed Apr 29 13:39:43 2015 +0000
description:
Use a single egrep and regexp instead of iterating over the list of files to
check and calling grep on each of them. Idea for using ":ts|" from Joerg.
Reduces the test runtime by around 50%, depending on platform and package.
diffstat:
mk/check/check-wrkref.mk | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (22 lines):
diff -r d1a501d19071 -r b0039a1ad518 mk/check/check-wrkref.mk
--- a/mk/check/check-wrkref.mk Wed Apr 29 13:05:28 2015 +0000
+++ b/mk/check/check-wrkref.mk Wed Apr 29 13:39:43 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-wrkref.mk,v 1.23 2014/10/12 23:39:17 joerg Exp $
+# $NetBSD: check-wrkref.mk,v 1.24 2015/04/29 13:39:43 jperkin Exp $
#
# This file checks that the installed files don't contain any strings
# that point to the directory where the package had been built, to make
@@ -93,10 +93,8 @@
*) ;; \
esac; \
${SHCOMMENT} "[$$file]"; \
- for d in ${_CHECK_WRKREF_DIRS}; do \
- grep "$$d" "${DESTDIR}$$file" 2>/dev/null | \
- sed -e "s|^|$$file: |"; \
- done; \
+ ${EGREP} "${_CHECK_WRKREF_DIRS:ts|}" "${DESTDIR}$$file" \
+ 2>/dev/null | ${SED} -e "s|^|$$file: |"; \
done
${RUN} \
exec 1>>${ERROR_DIR}/${.TARGET}; \
Home |
Main Index |
Thread Index |
Old Index