Commit 3009e9f9 authored by Richard Levitte's avatar Richard Levitte
Browse files

It seems like gcc does canonicalisation of file names. More

specifically, a starting './' is removed.  makedepend doesn't do this,
resulting in another possible commit war, so let's fix that by doing a
poor mans canonicalisation of file names that gives the same effect as
doing dependencies through gcc.
parent b30245da
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -34,9 +34,11 @@ foreach $file (sort keys %files) {
    my $dep;
    my $origfile=$file;
    $origfile=~s/\.o$/.c/;
    $file=~s/^\.\///;
    push @{$files{$file}},$origfile;
    my $prevdep="";
    foreach $dep (sort @{$files{$file}}) {
	$dep=~s/^\.\///;
	next if $prevdep eq $dep; # to exterminate duplicates...
	$prevdep = $dep;
	$len=0 if $len+length($dep)+1 >= 80;