diff options
author | jlam <jlam@pkgsrc.org> | 2005-06-13 02:25:50 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-06-13 02:25:50 +0000 |
commit | 1ffcef48db106ba62c4edf46b3c1ffea42e1c9b5 (patch) | |
tree | ff5acae920ef84e640dc161394cb957bd3457d9c /mk/bsd.pkg.mk | |
parent | 4714e01a69e67b0dbc8200e6cbd20cb21f5c2d30 (diff) | |
download | pkgsrc-1ffcef48db106ba62c4edf46b3c1ffea42e1c9b5.tar.gz |
In the check-wrkref target, change the algorithm so that text files
are checked for ${WRKDIR}, but all files are checked for ${TOOLS_DIR}
(assuming that ${TOOLS_DIR} is in ${WRKDIR}). Also, let CHECK_WRKREF_PKG
set the name of the package to check.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 0a98bafe6a1..e506b8d94b2 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1694 2005/06/11 04:26:17 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1695 2005/06/13 02:25:50 jlam Exp $ # # This file is in the public domain. # @@ -2539,13 +2539,18 @@ show-shlib-type: # check-wrkref is a make target that greps through the installed files # for a package and looks for references to the build directory. If -# any such references are found and PKG_DEVELOPER is defined, then exit -# with an error. This target is automatically run after a package is -# installed if CHECK_WRKREF is "yes". +# the file is a text file, then it is checked for "${WRKDIR}", and if +# it isn't, then it is checked for "${TOOLS_DIR}". If any such +# references are found and PKG_DEVELOPER is defined, then exit with an +# error. This target is automatically run after a package is installed +# if CHECK_WRKREF is "yes". # # CHECK_WRKREF_SKIP is a list of shell globs. Installed files that # match these globs are skipped when running the check-wrkref target. # +# CHECK_WRKREF_PKG is the name of the package to check. It defaults to +# ${PKGNAME}. +# .if make(check-wrkref) . if !defined(_CHECK_WRKREF_SKIP_FILTER) _CHECK_WRKREF_SKIP_FILTER= ${TRUE} @@ -2562,6 +2567,7 @@ MAKEVARS+= _CHECK_WRKREF_SKIP_FILTER .else _CHECK_WRKREF_SKIP_FILTER= ${TRUE} .endif +CHECK_WRKREF_PKG?= ${PKGNAME} .PHONY: check-wrkref check-wrkref: @@ -2569,11 +2575,18 @@ check-wrkref: ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} \ "${_PKGSRC_IN}> Checking for work-directory references in ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG} \ - ${PKG_INFO} -qL ${PKGNAME:Q} | ${SORT} | \ + ${PKG_INFO} -qL ${CHECK_WRKREF_PKG:Q} | ${SORT} | \ { while read file; do \ ${_CHECK_WRKREF_SKIP_FILTER}; \ - if ${GREP} -H ${WRKDIR:Q} "$$file" 2>/dev/null; then \ - found_wrkdir=1; \ + ${SHCOMMENT} [$$file]; \ + if ${_SUBST_IS_TEXT_FILE}; then \ + if ${GREP} -H ${WRKDIR:Q} "$$file" 2>/dev/null; then \ + found_wrkdir=1; \ + fi; \ + else \ + if ${GREP} -H ${TOOLS_DIR:Q} "$$file" 2>/dev/null; then \ + found_wrkdir=1; \ + fi; \ fi; \ done; \ if ${TEST} "$$found_wrkdir" = 1; then \ |