Lines Matching +full:continue +full:- +full:on +full:- +full:error
4 # meta2deps.sh - extract useful info from .meta files
21 # CMD "command-line"
24 # -- command output --
25 # -- filemon acquired metadata --
52 # $SB/obj-i386/bsd/include
53 # $SB/obj-i386/bsd/lib/csu/i386
54 # $SB/obj-i386/bsd/lib/libc
58 # $SB/src/pan-release/rtsock
59 # $SB/src/pfe-shared/include/jnx
72 # up with a list of all the directories which depend on each src
80 # SPDX-License-Identifier: BSD-2-Clause
82 # Copyright (c) 2011-2025, Simon J. Gerraty
83 # Copyright (c) 2010-2013, Juniper Networks, Inc.
102 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
109 sed -n '/^R .*\.[chyl]$/s,^..[0-9]* ,,p' |
110 sort -u
115 sed -n '/^R .*\/.*\.[a-z0-9][^\/]*$/s,^..[0-9]* \(.*\)/[^/]*$,\1,p' |
116 sort -u
126 -s) suffix="$2"; shift 2;;
136 *"$sep$top$suffix$sep"*) continue;;
143 # some Linux systems have deprecated egrep in favor of grep -E
147 *) egrep() { grep -E "$@"; }
151 egrep -v "$EXCLUDES"
154 error() { function
155 echo "ERROR: $@" >&2
168 -a) MACHINE_ARCH=$2; shift 2;;
169 -m) MACHINE=$2; shift 2;;
170 -C) CURDIR=$2; shift 2;;
171 -H) HOST_TARGET=$2; shift 2;;
172 -S) add_list SRCTOPS $2; shift 2;;
173 -O) add_list OBJROOTS $2; shift 2;;
174 -X) add_list EXCLUDES '|' $2; shift 2;;
175 -R) RELDIR=$2; shift 2;;
176 -T) TARGET_SPEC=$2; shift 2;;
190 *$MACHINE*|*${TARGET_SPEC:-$MACHINE}*) ;;
191 *) add_list _o $o; continue;;
196 "") continue;;
210 OBJTOP=$o${TARGET_SPEC:-$MACHINE}
217 add_list '|' -s '/*' src_re $SRCTOPS
218 add_list '|' -s '*' obj_re $OBJROOTS
220 [ -z "$RELDIR" ] && unset DPDEPS
221 tf=/tmp/m2d$$-$USER
222 rm -f $tf.*
223 trap 'rm -f $tf.*; trap 0' 0
252 sed -e 's,^CWD,C C,;/^[#CREFLMVWX] /!d' -e "s,',,g" |
257 # first a sanity check - filemon on Linux is not very reliable
258 # path2 should only be non-empty for op L or M
262 [LM],) error "missing path2 in: '$op $pid $path'";;
263 [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";;
265 *) error "wrong number of words in: '$op $pid $path $path2'";;
271 if [ -z "$SB" ]; then
274 SRCTOP=${SRCTOP:-$SB/src}
277 0) error "no filemon data";;
283 0) error "truncated filemon data";;
286 continue
289 [1-9]*)
294 eval ldir=\${ldir_$pid:-$CWD} cwd=\${cwd_$pid:-$CWD}
301 V,*) version=$pid; continue;;
302 W,*srcrel|*.dirdep) continue;;
309 test -d ${cwd:-/dev/null/no/such} || cwd=$CWD
311 continue
315 continue
317 \#,bye) eof_token=1; continue;;
318 \#*) continue;;
322 case `'ls' -l $path 2> /dev/null | sed 's, .*,,'` in
327 X) xpids="$xpids $pid"; continue;;
332 /*) continue;;
340 test -e $path && break
351 *,$dir,*) continue;;
354 *,$path,*) continue;;
366 ${CURDIR:-.}|"") continue;;
372 *,$dir,*) continue;;
379 *,$dir,*) continue;;
383 if [ -d $path ]; then
388 continue
390 [ -f $path ] || continue
392 $CWD) continue;; # ignore
402 continue
407 if [ -s $path.dirdep ]; then
411 continue
412 elif [ -s $dir.dirdep ]; then
415 continue
425 0) error "no filemon data";;
429 0) error "truncated filemon data";;
436 *) error "missing eXit for pid $p";;
442 [ -s $f ] || continue
450 xargs cat < $f | sort -u |
451 sed "s,^# ,,;s,^,$OBJTOP/,;s,\.${TARGET_SPEC:-$MACHINE}\$,,;s,\.$MACHINE\$,,"
453 *) sort -u $f;;
457 if [ -s $tf.dpdeps ]; then
462 sort -u $tf.dpdeps |
463 sed "s,${SRCTOP}/,,;s,${SB_BACKING_SB:-$SB}/src/,," >> $DPDEPS
465 # ensure we produce _something_ else egrep -v gets upset