summaryrefslogtreecommitdiff
path: root/mk/check
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-03-15 01:06:02 +0000
committerrillig <rillig@pkgsrc.org>2007-03-15 01:06:02 +0000
commitd61f4b03b708c87cbb80c0b828293310410d26b8 (patch)
tree81c3b8ca0287775af735b2b51df62fe2c0c6d99f /mk/check
parent6d21469c5b79f43806383818b17f6eea36ae4cf0 (diff)
downloadpkgsrc-d61f4b03b708c87cbb80c0b828293310410d26b8.tar.gz
The CHECK_WRKREF variable has changed type: It is now a list of
directory aliases. That makes it possible to check for references into TOOLS_DIR and WRKSRC, but to leave out the other infrastructure directories. On IRIX, x11/gtk2 failed to build because of an unknown library -lharfbuzz. That library turned out to be an internal dependency of graphics/cairo, which had made it into the installed libpangocairo.la file. With this change, that bug would have been caught earlier.
Diffstat (limited to 'mk/check')
-rw-r--r--mk/check/check-wrkref.mk34
1 files changed, 18 insertions, 16 deletions
diff --git a/mk/check/check-wrkref.mk b/mk/check/check-wrkref.mk
index 7155519cc85..af0001765ef 100644
--- a/mk/check/check-wrkref.mk
+++ b/mk/check/check-wrkref.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-wrkref.mk,v 1.11 2007/01/07 11:21:24 rillig Exp $
+# $NetBSD: check-wrkref.mk,v 1.12 2007/03/15 01:06:02 rillig 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
@@ -8,10 +8,10 @@
# User-settable variables:
#
# CHECK_WRKREF:
-# The kind of directory that must not appear in installed files.
+# The list of directory names that must not appear in installed files.
#
-# * "no" to disable this check at all
# * "tools" for the tool wrapper directory
+# * "wrksrc" for WRKSRC
# * "work" for WRKDIR
# * "wrkobjdir" for WRKOBJDIR
#
@@ -36,13 +36,19 @@ _CHECK_WRKREF_DIR.no= # none
_CHECK_WRKREF_DIR.work= ${WRKDIR}
_CHECK_WRKREF_DIR.tools= ${TOOLS_DIR}
_CHECK_WRKREF_DIR.wrkobjdir= ${WRKOBJDIR}
+_CHECK_WRKREF_DIR.wrksrc= ${WRKSRC}
-.if !defined(_CHECK_WRKREF_DIR.${CHECK_WRKREF})
-PKG_FAIL_REASON+= "[check-wrkref.mk] CHECK_WRKREF must be one of { no tools work objwrkdir }."
-.endif
-_CHECK_WRKREF_DIR= ${_CHECK_WRKREF_DIR.${CHECK_WRKREF}}
+_CHECK_WRKREF_DIRS= # none
+.for d in ${CHECK_WRKREF}
+. if !defined(_CHECK_WRKREF_DIR.${d})
+PKG_FAIL_REASON+= "[check-wrkref.mk] Invalid value "${d:Q}" for CHECK_WRKREF."
+PKG_FAIL_REASON+= "[check-wrkref.mk] Try one of { tools wrksrc work objwrkdir } instead."
+. else
+_CHECK_WRKREF_DIRS+= ${_CHECK_WRKREF_DIR.${d}}
+. endif
+.endfor
-.if empty(CHECK_WRKREF:M[nN][oO])
+.if empty(CHECK_WRKREF:M[nN][oO]) && !empty(_CHECK_WRKREF_DIRS:M*)
privileged-install-hook: _check-wrkref
.endif
@@ -59,16 +65,12 @@ _check-wrkref: error-check .PHONY
*) ;; \
esac; \
${SHCOMMENT} "[$$file]"; \
- case ${_CHECK_WRKREF_DIR:Q}"" in \
- "") ${ERROR_MSG} "[check-wrkref.mk] The directory to check is empty."; \
- exit 1; \
- ;; \
- *) grep ${_CHECK_WRKREF_DIR:Q}"" "$$file" 2>/dev/null | \
+ for d in ${_CHECK_WRKREF_DIRS}; do \
+ grep "$$d" "$$file" 2>/dev/null | \
sed -e "s|^|$$file: |"; \
- ;; \
- esac; \
+ done; \
done
- ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${RUN} \
exec 1>>${ERROR_DIR}/${.TARGET}; \
if ${_NONZERO_FILESIZE_P} ${ERROR_DIR}/${.TARGET}; then \
${ECHO} "*** The above files still have references to the build directory."; \