diff options
author | jperkin <jperkin@pkgsrc.org> | 2015-04-29 13:39:43 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2015-04-29 13:39:43 +0000 |
commit | 12a73e277e6cf60b71135308a717efd254c62a52 (patch) | |
tree | a49011d02f6ca7bea162ef2bc64e224c38920386 /mk | |
parent | d4732893d73d2510d29559c392c7b144eb88d44c (diff) | |
download | pkgsrc-12a73e277e6cf60b71135308a717efd254c62a52.tar.gz |
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 (limited to 'mk')
-rw-r--r-- | mk/check/check-wrkref.mk | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mk/check/check-wrkref.mk b/mk/check/check-wrkref.mk index 1a2ac0d9e54..e4565fde2e1 100644 --- a/mk/check/check-wrkref.mk +++ b/mk/check/check-wrkref.mk @@ -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 @@ _check-wrkref: error-check .PHONY *) ;; \ 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}; \ |