summaryrefslogtreecommitdiff
path: root/mk/meta2deps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mk/meta2deps.sh')
-rwxr-xr-xmk/meta2deps.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/mk/meta2deps.sh b/mk/meta2deps.sh
index e56e52a89675..f01d54774a04 100755
--- a/mk/meta2deps.sh
+++ b/mk/meta2deps.sh
@@ -77,7 +77,7 @@
# RCSid:
-# $Id: meta2deps.sh,v 1.13 2020/08/19 17:51:53 sjg Exp $
+# $Id: meta2deps.sh,v 1.14 2020/10/02 03:11:17 sjg Exp $
# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
@@ -143,6 +143,11 @@ _excludes_f() {
egrep -v "$EXCLUDES"
}
+error() {
+ echo "ERROR: $@" >&2
+ exit 1
+}
+
meta2deps() {
DPDEPS=
SRCTOPS=$SRCTOP
@@ -236,8 +241,8 @@ meta2deps() {
;;
*) cat /dev/null "$@";;
esac 2> /dev/null |
- sed -e 's,^CWD,C C,;/^[CREFLM] /!d' -e "s,',,g" |
- $_excludes |
+ sed -e 's,^CWD,C C,;/^[CREFLMV] /!d' -e "s,',,g" |
+ $_excludes | ( version=no
while read op pid path junk
do
: op=$op pid=$pid path=$path
@@ -249,6 +254,12 @@ meta2deps() {
SB=`echo $CWD | sed 's,/obj.*,,'`
fi
SRCTOP=${SRCTOP:-$SB/src}
+ case "$verion" in
+ no) ;; # ignore
+ 0) error "no filemon data";;
+ *) ;;
+ esac
+ version=0
continue
;;
$pid,$pid) ;;
@@ -263,6 +274,7 @@ meta2deps() {
esac
case "$op,$path" in
+ V,*) version=$path; continue;;
W,*srcrel|*.dirdep) continue;;
C,*)
case "$path" in
@@ -368,6 +380,9 @@ meta2deps() {
echo $dir;;
esac
done > $tf.dirdep
+ case "$version" in
+ 0) error "no filemon data";;
+ esac ) || exit 1
_nl=echo
for f in $tf.dirdep $tf.qual $tf.srcdep
do