From f3fb0c74a6ed6206912a425daf324edfca6cf3d6 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 26 Jan 1999 20:27:25 +0000 Subject: [PATCH] Fix mkdep to split lines with multiple dependencies. --- build/mkdep | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/build/mkdep b/build/mkdep index 102b932ebc..6620fbfe8f 100755 --- a/build/mkdep +++ b/build/mkdep @@ -132,17 +132,21 @@ $CC -M $files | \ $SED | \ awk ' $1 ~ /:/ { - filenm=$1 - dep=$2 + filenm=$1; + dep=substr($0, length(filenm)+1); } $1 !~ /:/ { - dep=$1 + dep=$0; } /.*/ { - if (( noslash == "yes") && (dep ~ /^\// )) next - if ( length(dep) < 2 ) next - rec = filenm " " dep; - print rec; + split(dep, depends, " "); + for(d in depends) { + dfile = depends[d]; + if (( noslash == "yes") && (dfile ~ /^\// )) next + if ( length(dfile) < 2 ) continue + rec = filenm " " dfile; + print rec; + } } ' noslash="$NOSLASH" >> $TMP -- 2.39.5