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 | 917644d126e3bb2c91cd49f80e1595a96422c709 (patch) | |
tree | a49011d02f6ca7bea162ef2bc64e224c38920386 /mk/check | |
parent | a27429a7b9f730058fb571668646b9e5c7701fc7 (diff) | |
download | pkgsrc-917644d126e3bb2c91cd49f80e1595a96422c709.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/check')
-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}; \ |