- line: while (<$fhandle>) {
- next line if ! /^#/;
- next line if /^#(ident|pragma)/;
- chop; # rm trailing newline
-
- $_ = &tidy_dir_names($_);
-
- # strip junk off the front and back
- $_ =~ s/^#\s+\d+\s+//;
- $_ =~ s/[ 0-9]*$//;
-
- # a little bit of ad-hoc fiddling now:
- # don't bother w/ dependencies on /usr/include stuff
- # don't bother if it looks like a GCC built-in hdr file
- # don't bother with funny yacc-ish files
- # don't bother with "literate" .h files (.lh); we'll just
- # depend on the de-litified versions (which have better info)
- # don't let a file depend on itself
- next line if /^\/usr\/include/;
- # Hack - the cygwin32 dir structure is odd!
- next line if /H-i386-cygwin32\/i386-cygwin32/;
- next line if /H-i386-cygwin32\/lib\/gcc-lib\/i386-cygwin32/;
- next line if /\/gcc-lib\/[^\/\n]+\/[\.0-9]+\/include\//;
- next line if /\/gnu\/[^-\/]+-[^-\/]+-[^-\/]+\/include\//;
- next line if /\/yaccpar/;
- next line if /\/bison\.(simple|hairy)/;
- next line if /\.lh$/;
- next line if $_ eq $fname;
-
- print STDERR "$fname :: $_\n" if $Verbose;
-
- # ToDo: some sanity checks that we still have something reasonable?
-
- $depend = "$of : $_\n";
- next line if $Depend_seen{$depend}; # already seen this one...
-
- # OK, it's a new one.
- push (@Depend_lines, $depend);
- $Depend_seen{$depend} = 1;
+ ($deps = $dep_contents) =~ s|^[^:]+:(.*)$|$1|g;
+ $deps =~ s| \\| |g;
+
+ @Deps = split(/ +/, $deps);
+
+ $depend = "$baseName.$Obj_suffix";
+ foreach $suff (@File_suffix) {
+ $depend .= " $baseName.${suff}_$Obj_suffix";