pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk In the check-wrkref target, change the algorithm so...
details: https://anonhg.NetBSD.org/pkgsrc/rev/af210c1490ec
branches: trunk
changeset: 495541:af210c1490ec
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Jun 13 02:25:50 2005 +0000
description:
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:
mk/bsd.pkg.mk | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r 80f449f8aaba -r af210c1490ec mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Sun Jun 12 21:21:58 2005 +0000
+++ b/mk/bsd.pkg.mk Mon Jun 13 02:25:50 2005 +0000
@@ -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 @@
# 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 @@
.else
_CHECK_WRKREF_SKIP_FILTER= ${TRUE}
.endif
+CHECK_WRKREF_PKG?= ${PKGNAME}
.PHONY: check-wrkref
check-wrkref:
@@ -2569,11 +2575,18 @@
${_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 \
Home |
Main Index |
Thread Index |
Old Index