]> git.sur5r.net Git - openldap/commitdiff
Fix mkdep to split lines with multiple dependencies.
authorKurt Zeilenga <kurt@openldap.org>
Tue, 26 Jan 1999 20:27:25 +0000 (20:27 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 26 Jan 1999 20:27:25 +0000 (20:27 +0000)
build/mkdep

index 102b932ebc2c45773f1e2c30fa7c2e1a9b35ad34..6620fbfe8f940ae7fe07595cb840e59375194820 100755 (executable)
@@ -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