aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorvd <vd@FreeBSD.org>2006-09-14 17:13:39 +0800
committervd <vd@FreeBSD.org>2006-09-14 17:13:39 +0800
commit1f18fd7468469ab475735dc0ea159a651f1f6ac0 (patch)
tree607478405d227d70dc8b4e6b128afe0df7ff3299 /Tools/scripts
parent7425a73025730b92426dbb87e07a18f68e7d8367 (diff)
downloadfreebsd-ports-gnome-1f18fd7468469ab475735dc0ea159a651f1f6ac0.tar.gz
freebsd-ports-gnome-1f18fd7468469ab475735dc0ea159a651f1f6ac0.tar.zst
freebsd-ports-gnome-1f18fd7468469ab475735dc0ea159a651f1f6ac0.zip
When checking dependencies also look for portname references in Mk/*.mk
in addition to */*/Makefile* and ignore references in comments
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/rmport10
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/scripts/rmport b/Tools/scripts/rmport
index 5a67a925a23c..10723c1a4a76 100755
--- a/Tools/scripts/rmport
+++ b/Tools/scripts/rmport
@@ -143,13 +143,13 @@ check_dep()
err=1
fi
- # check if some port mentions the port to be deleted
- portdir_grep="/`basename ${catport}`"
- r="`find ${PORTSDIR} -mindepth 3 -maxdepth 3 -name "Makefile*" \
- |xargs grep -H ${portdir_grep} \
+ # check if some Makefiles mention the port to be deleted
+ portdir_grep="^[^#].*/`basename ${catport}`([[:space:]]+|$)"
+ r="`find ${PORTSDIR} -mindepth 2 -maxdepth 3 \( -name "Makefile*" -or -path "*Mk/*.mk" \) \
+ |xargs grep -EH "${portdir_grep}" \
|grep -vE "^(${rmcatports})" || :`"
if [ -n "${r}" ] ; then
- log "${catport}: some ports mention ${portdir_grep} in their Makefiles:"
+ log "${catport}: some Makefiles mention ${portdir_grep}:"
printf "%s\n" "${r}" >&2
err=1
fi